lazy trimming of the commit list

Robey Pointer robey at lag.net
Sun Jul 10 07:14:27 BST 2005


Okay, I got a confidence boost from that diff patch earlier, and  
since I'm stuck inside all weekend, I decided to try to hack up a  
feature I really wanted.

At work, we use perforce, and it has this feature I use all the  
time.  You can do a blanket "commit" with no log message, and it will  
open your $EDITOR and let you type in a message that way.  But it  
also lets you edit the file list in the commit message, so you can  
browse the list of changed files and delete the ones you don't want  
to checkin.

This patch adds that feature, by supplying a slightly different  
format for the file list in the commit message, then rebuilding the  
commit file-list afterwards based on which lines are still present.   
It's just a rough patch as a proof of concept; I don't expect it to  
get taken as-is, but maybe other people will find it useful?

One note: Perforce will actually let you add new files to the list,  
if (for example) you edited some files in a different window after  
you opened the commit.  I didn't implement that. :)

(I'm also trying out the cset plugin, so this is indirectly against  
@856, in case that isn't apparent.)

robey

-------------- next part --------------
A non-text attachment was scrubbed...
Name: commit.cset
Type: application/octet-stream
Size: 8016 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050709/f6785650/attachment.obj 
-------------- next part --------------



More information about the bazaar mailing list