Bug 228867

Summary: [git-webkit] Add automatic Editor configuration
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, dewei_zhu, slewis, 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=225985
Bug Depends on: 225985    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing none

Description Jonathan Bedard 2021-08-06 10:04:34 PDT
Although git provides a command line API to set your log editor, I've found many folks aren't familiar with setting that up. Given that the set of commonly used editors is pretty small, I think we can improve engineering effectiveness by automating this process.
Comment 1 Radar WebKit Bug Importer 2021-08-06 10:08:34 PDT
<rdar://problem/81621991>
Comment 2 Jonathan Bedard 2021-08-06 10:21:31 PDT
Created attachment 435076 [details]
Patch
Comment 3 Jonathan Bedard 2021-08-06 16:44:32 PDT
Created attachment 435099 [details]
Patch
Comment 4 Jonathan Bedard 2021-08-10 16:53:09 PDT
Created attachment 435314 [details]
Patch
Comment 5 Jonathan Bedard 2021-08-31 15:45:54 PDT
Created attachment 436954 [details]
Patch
Comment 6 dewei_zhu 2021-09-01 09:38:46 PDT
Comment on attachment 436954 [details]
Patch

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

> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/editor.py:34
> +            path='/Applications/Atom.app/Contents/Resources/app/atom.sh',

Is it save to assume the user uses macOS?
Comment 7 Jonathan Bedard 2021-09-01 09:47:22 PDT
Comment on attachment 436954 [details]
Patch

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

>> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/editor.py:34
>> +            path='/Applications/Atom.app/Contents/Resources/app/atom.sh',
> 
> Is it save to assume the user uses macOS?

No, that's why these are functions. I know that I've missed both editors and instances of editors on specific OSes. If the path to an editor doesn't exist, it won't be provided as an option. I'm not sure how folks who use atom (or sublime or textmate) on non-mac OSes have their development environments setup, if anyone feels strongly, I figure that can make the edits needed and propose it.
Comment 8 dewei_zhu 2021-09-01 09:58:18 PDT
Comment on attachment 436954 [details]
Patch

r=me
Comment 9 Jonathan Bedard 2021-09-01 10:17:06 PDT
Created attachment 437040 [details]
Patch for landing
Comment 10 EWS 2021-09-01 11:15:26 PDT
Committed r281862 (241192@main): <https://commits.webkit.org/241192@main>

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