5

I really like being able to the command-line tool gitx from Terminal.app to open GitX and see the Git repository change log that I can scroll through, with nicely formatted diffs for each.

Git and Subversion are fairly different, and I know a tool to view a log and diffs for a checkout of a part of the subversion repo certainly wouldn't be the same as viewing a git repo via GitX. But, is there anything out there that allows command-line execution that would allow me to see a similar log in a checked-out directory of a svn repo with even a vaguely similar interface?

Gary S. Weaver
  • 7,966
  • 4
  • 37
  • 61

3 Answers3

1

there is a program called SvnX i think

andyzweb
  • 21
  • 2
  • I've tried svnx and Versions. Running Svnx 1.3 installs the script ~/bin/svnx, but the command ~/bin/svnx -l ." in a trunk directory throws up the error: "No working copy found. svnX cannot find a working copy for the file “/path/to/project/trunk/.”. Please make sure that the working copy that owns the file is defined in svnX's Working Copies window." Versions 1.1 doesn't seem to support opening log from command line (".../Versions" just opens the app and ".../Versions" . crashes it). – Gary S. Weaver Dec 17 '10 at 19:01
  • Just figured out the svnx issue and it works great thanks to help from chris0 at lavabit: ~/bin/svnx wc . && ~/bin/svnx log . – Gary S. Weaver Dec 21 '10 at 17:14
1

SvnX can be used at command-line to do this:

~/bin/svnx wc . && ~/bin/svnx log .

I added an alias for this in .bash_profile:

alias svnx='~/bin/svnx wc . && ~/bin/svnx log .'

Then after restarting Terminal.app, I can cd into an svn trunk directory and just use:

svnx

It works well, although it is a little slow with big logs, requires a few more clicks than gitx to see each revision's changeset, and shows the entire documents you are comparing in the diff tool rather than just the diffs. But, it allows you to choose between different versions in the log to compare and much more.

I normally wouldn't make the alias the same name as the script it is calling, but in this case I use gitx for the same purpose (opening up the current project to view diffs), so it makes it easy to remember.

Thanks to chris0 of lavabit for the info on adding the working copy!

Gary S. Weaver
  • 7,966
  • 4
  • 37
  • 61
0

download this fmdiff script and put it in /usr/local/bin

then run svn diff --diff-cmd fmdiff instead of svn diff and the diff will load up in FileMerge.app, Apple's diff tool

Ford
  • 1,485
  • 3
  • 14
  • 20
  • GitX at command line doesn't only show the most recent diff, it shows the log which you scroll through and can see the author, time, and colored individual diffs for each commit. It also provides insight into the branching history, which I wouldn't necessarily expect in a svn client. But, that is a neat script, thanks! – Gary S. Weaver Dec 17 '10 at 19:09