Implement CommitWindow per-item action menu.

--action-cmd specifies an action that may be performed on a file.
Provide multiple action commands by passing --action-cmd multiple times, each 
with a different command argument.

The argument to --action-cmd is two comma-seperated lists separated by a colon, 
of the form "A,M,D:Revert,/usr/local/bin/svn,revert"

On the left side of the colon is a list of status character or character 
sequences; a file must have one of these
for this command to be enabled.

On the right side  is a list:
        Item 1 is the human-readable name of the command.
        Item 2 is the path (either absolute or accessible via $PATH) to the 
executable.
        Items 3 through n are the arguments to the executable.
        CommitWindow will append the file path as the last argument before 
executing the command.
        Multiple paths may be appended in the future.

The executable should return a single line of the form "<new status 
character(s)><whitespace><file path>" for each path.

For Subversion, commands might be:
        "?:Add,/usr/local/bin/svn,add"
        "A:Mark Executable,/usr/local/bin/svn,propset,svn:executable,true"
        "A,M,D,C:Revert,/usr/local/bin/svn,revert"
        "C:Resolved,/usr/local/bin/svn,resolved"

Only the first colon is significant, so that, for example, 'svn:executable' in 
the example above works as expected. This does scheme assume that neither comma 
nor colon will be used in status sequences. The file paths themselves may 
contain commas, since those are handled out of bounds. We could introduce comma 
or colon quoting if needed. But I hope not.

Changed:
U   trunk/Support/bin/CommitWindow.app/Contents/MacOS/CommitWindow
U   
trunk/Support/bin/CommitWindow.app/Contents/Resources/English.lproj/MainMenu.nib/info.nib
U   
trunk/Support/bin/CommitWindow.app/Contents/Resources/English.lproj/MainMenu.nib/keyedobjects.nib
U   trunk/Tools/CommitWindowProject/CommitWindowCommandLine.m
U   trunk/Tools/CommitWindowProject/CommitWindowController.h
U   trunk/Tools/CommitWindowProject/CommitWindowController.m
U   trunk/Tools/CommitWindowProject/English.lproj/MainMenu.nib/info.nib
U   trunk/Tools/CommitWindowProject/English.lproj/MainMenu.nib/keyedobjects.nib
U   trunk/Tools/CommitWindowProject/NSString+StatusString.m

_______________________________________________
textmate-dev mailing list
[email protected]
http://lists.macromates.com/mailman/listinfo/textmate-dev

Reply via email to