Re: [webkit-dev] webkit-patch requests

2010-05-19 Thread Adam Barth
On Wed, May 19, 2010 at 10:27 AM, Darin Adler da...@apple.com wrote:
 Not sure where to put these. A while ago people were talking about changes 
 needed to webkit-patch. Here are some of the basics for me for one command, 
 webkit-patch upload. When I use webkit-patch upload to create a patch in a 
 tree where I have not yet written anything for change log, webkit-patch loads 
 the change log files into an editor for me with prepared change log entries 
 for me to edit. Here are the problems I have with that:

    1) The script uses vi, but my preferred editor is Xcode. I have an 
 environment variable, CHANGE_LOG_EDIT_APPLICATION, set to Xcode.

Thanks for the feedback.  Webkit-patch already respects the EDITOR
environment variable.  It should be a simple change to support the
CHANGE_LOG_EDIT_APPLICATION environment variable also.  The function
that needs to change is:

http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L73

    2) When it brings up the change logs in the editor, it does not show me a 
 diff until after I am done editing them. I can’t write a good change log 
 without having a diff to refer to.

Would opening the pretty-diff in a browser be sufficient here?  We can
reverse the order of showing the diff and editing the ChangeLog.  The
trade-off here is that you won't see the exact diff that the script
will upload to bugs.webkit.org.

Adam
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] webkit-patch requests

2010-05-19 Thread Darin Adler
On May 19, 2010, at 10:52 AM, Adam Barth wrote:

 Thanks for the feedback. Webkit-patch already respects the EDITOR environment 
 variable. It should be a simple change to support the 
 CHANGE_LOG_EDIT_APPLICATION environment variable also. The function that 
 needs to change is:
 
 http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L73

When I created the prepare-ChangeLog and commit-log-editor scripts 8 years ago 
I did the following:

- Had a separate CVS_LOG_EDITOR (later SVN_LOG_EDITOR) environment variable 
in case someone wanted a different editor for this purpose than the general 
case.

- Added CHANGE_LOG_EDIT_APPLICATION to adapt the work flow better to a Mac 
OS X application where you would not quit after editing the files. But I had to 
come up with a different way to indicate “I’m done” in such cases. Probably 
could do something similar to what we do after launching Safari to browse the 
diff.

There’s also a tool called xed that I could probably use as an EDITOR. The xed 
command has an option --wait that can make it behave more like modal vi. The 
xed tool was created many years after I wrote those scripts.

2) When it brings up the change logs in the editor, it does not show me a 
 diff until after I am done editing them. I can’t write a good change log 
 without having a diff to refer to.
 
 Would opening the pretty-diff in a browser be sufficient here? We can reverse 
 the order of showing the diff and editing the ChangeLog. The trade-off here 
 is that you won't see the exact diff that the script will upload to 
 bugs.webkit.org.

Or we could show the diff twice. It all depends on whether we think reviewing 
change log entries after writing them in the context of the rest of the patch 
is an important step. I wouldn’t mind seeing the diff a second time, especially 
if we could figure out a way to make sure it doesn’t open a second window.

-- Darin

___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] webkit-patch requests

2010-05-19 Thread Adam Barth
On Wed, May 19, 2010 at 11:04 AM, Darin Adler da...@apple.com wrote:
 On May 19, 2010, at 10:52 AM, Adam Barth wrote:
 Thanks for the feedback. Webkit-patch already respects the EDITOR 
 environment variable. It should be a simple change to support the 
 CHANGE_LOG_EDIT_APPLICATION environment variable also. The function that 
 needs to change is:

 http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L73

 When I created the prepare-ChangeLog and commit-log-editor scripts 8 years 
 ago I did the following:

    - Had a separate CVS_LOG_EDITOR (later SVN_LOG_EDITOR) environment 
 variable in case someone wanted a different editor for this purpose than the 
 general case.

    - Added CHANGE_LOG_EDIT_APPLICATION to adapt the work flow better to a Mac 
 OS X application where you would not quit after editing the files. But I had 
 to come up with a different way to indicate “I’m done” in such cases. 
 Probably could do something similar to what we do after launching Safari to 
 browse the diff.

 There’s also a tool called xed that I could probably use as an EDITOR. The 
 xed command has an option --wait that can make it behave more like modal 
 vi. The xed tool was created many years after I wrote those scripts.

I'll check out how these work in prepare-ChangeLog.  We can either
replicate that logic here or pass the appropriate arguments to
prepare-ChangeLog to trigger the editing there.

Adam


    2) When it brings up the change logs in the editor, it does not show me 
 a diff until after I am done editing them. I can’t write a good change log 
 without having a diff to refer to.

 Would opening the pretty-diff in a browser be sufficient here? We can 
 reverse the order of showing the diff and editing the ChangeLog. The 
 trade-off here is that you won't see the exact diff that the script will 
 upload to bugs.webkit.org.

 Or we could show the diff twice. It all depends on whether we think reviewing 
 change log entries after writing them in the context of the rest of the patch 
 is an important step. I wouldn’t mind seeing the diff a second time, 
 especially if we could figure out a way to make sure it doesn’t open a second 
 window.
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] webkit-patch requests

2010-05-19 Thread Maciej Stachowiak

On May 19, 2010, at 11:04 AM, Darin Adler wrote:

 On May 19, 2010, at 10:52 AM, Adam Barth wrote:
 
 Thanks for the feedback. Webkit-patch already respects the EDITOR 
 environment variable. It should be a simple change to support the 
 CHANGE_LOG_EDIT_APPLICATION environment variable also. The function that 
 needs to change is:
 
 http://trac.webkit.org/browser/trunk/WebKitTools/Scripts/webkitpy/common/system/user.py#L73
 
 When I created the prepare-ChangeLog and commit-log-editor scripts 8 years 
 ago I did the following:
 
- Had a separate CVS_LOG_EDITOR (later SVN_LOG_EDITOR) environment 
 variable in case someone wanted a different editor for this purpose than the 
 general case.
 
- Added CHANGE_LOG_EDIT_APPLICATION to adapt the work flow better to a Mac 
 OS X application where you would not quit after editing the files. But I had 
 to come up with a different way to indicate “I’m done” in such cases. 
 Probably could do something similar to what we do after launching Safari to 
 browse the diff.
 
 There’s also a tool called xed that I could probably use as an EDITOR. The 
 xed command has an option --wait that can make it behave more like modal 
 vi. The xed tool was created many years after I wrote those scripts.

The Mac OS X open command also has a -W option which can wait for quit.

I believe setting EDITOR=open -W -a Xcode would probably do it.

Regards,
Maciej
 
___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev


Re: [webkit-dev] webkit-patch requests

2010-05-19 Thread Timothy Hatcher
The xed --wait is much better, since it waits for the files to be closed, not 
for Xcode to quit. (And quitting Xcode is pretty disruptive if you have 
projects open.)

On May 19, 2010, at 1:08 PM, Maciej Stachowiak wrote:

 There’s also a tool called xed that I could probably use as an EDITOR. The 
 xed command has an option --wait that can make it behave more like modal 
 vi. The xed tool was created many years after I wrote those scripts.
 
 The Mac OS X open command also has a -W option which can wait for quit.
 
 I believe setting EDITOR=open -W -a Xcode would probably do it.

— Timothy Hatcher


___
webkit-dev mailing list
webkit-dev@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev