Schlagworte: jedit


TortoiseSVN/VCS GUI integration in jEdit

I've created the following macros to easily launch various SVN commands in TortoiseSVN at work.

To use them yourself, just create the displayed files (VCS/*.bsh) in your personal "macros" directory (~/.jedit/macros).


for i in ~/.jedit/macros/VCS/*; do echo "$i:"; cat $i; done
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:blame /path:\""+buffer.getPath()+"\" /line:"+(textArea.getCaretLine()+1);
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:commit /path:\""+buffer.getPath()+"\" /logmsg:\""+buffer.getName()+": \"";
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:diff /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:log /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );

You can now execute those macros either by calling them from the "Macros" menu, assign a shortcut to them or (my preferred way) via Ctrl-Enter, typing parts of them and then TAB-completing it (e.g. Ctrl-Enter, "log_", TAB, Enter).

They do not have "svn" in the name, since they might get extended to use the appropriate VCS GUI command in the future, for example by testing if there's a .svn control directory or using commands like "bzr st" or "git status" to check if it's a Bazaar/Git/... file.

(For debugging, you can use Macros.message( view, exec ); to display the "exec" value in a message)

By Daniel in development, Snippets2010-01-27 English (EU) Email