Tudor Timi
Tudor Timi

Reputation: 7573

Define custom SVN subcommand

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.

Upvotes: 3

Views: 219

Answers (1)

zb226
zb226

Reputation: 10500

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.

Upvotes: 3

Related Questions