Bug 228621

Summary: [git-webkit] Forward errors from log and blame
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=228619
Attachments:
Description Flags
Patch
none
Patch for landing none

Description Jonathan Bedard 2021-07-29 16:40:03 PDT
We should forward errors from `git/svn log/blame` commands.
Comment 1 Radar WebKit Bug Importer 2021-07-29 16:40:17 PDT
<rdar://problem/81297642>
Comment 2 Jonathan Bedard 2021-07-30 08:23:25 PDT
Created attachment 434628 [details]
Patch
Comment 3 Aakash Jain 2021-07-30 08:58:21 PDT
Comment on attachment 434628 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434628&action=review

rs=me

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:258
> +            if not log_output.returncode:

Might be more clear to explicitly compare with 0

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:260
> +                    sys.stderr.write(line)

why not print? Also, can you avoid this for loop and directly print whole thing in a single statement?
Comment 4 Jonathan Bedard 2021-07-30 10:02:00 PDT
(In reply to Aakash Jain from comment #3)
> Comment on attachment 434628 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=434628&action=review
> 
> rs=me
> 
> > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:258
> > +            if not log_output.returncode:
> 
> Might be more clear to explicitly compare with 0

It might be 'None', particularly for `git log` or `svn log`

> 
> > Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/command.py:260
> > +                    sys.stderr.write(line)
> 
> why not print? Also, can you avoid this for loop and directly print whole
> thing in a single statement?
Comment 5 Jonathan Bedard 2021-07-30 10:15:06 PDT
Created attachment 434643 [details]
Patch for landing
Comment 6 EWS 2021-07-30 10:46:45 PDT
Committed r280483 (240118@main): <https://commits.webkit.org/240118@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 434643 [details].