Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Define custom SVN subcommand

Tags:

svn

Is it possible to define a custom subcommand in SVN? I'd like to define my own svn tkdiff subcommand that would simply call svn diff --diff-cmd=tkdiff on a single file.

like image 350
Tudor Timi Avatar asked Dec 06 '25 03:12

Tudor Timi


1 Answers

Unfortunately, Subversion can't do this as elegantly as git can, using the [alias] section in the ~/.gitconfig file.

However, if you can live without the standard diff-tool, you can globally configure Subversion to use another diff tool by adding a line to ~/.subversion/config (%APPDATA%/Subversion/config if you are on Windows) like so:

diff-cmd = tkdiff

If that's not an option, you can still resort to...

  • adding an alias like svntkdiff to your .cshrc / .bashrc / ...
  • writing a wrapper script that mangles a call svn tkdiff to do a svn diff --diff-cmd=tkdiff and simply passes through all other Subversion commands unmodified.
like image 106
zb226 Avatar answered Dec 08 '25 23:12

zb226



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!