EDIT: or i could just use tkdiff, part of the tkcvs package. it's smart enough to compare against latest repository version if there's only one file arg.
Tuesday, June 2, 2009
svn and xxdiff
svn and xxdiff don't play nice, so i wrote a little python script to clean up the args svn gives to an external diff.
svnxxdiff:
#!/usr/bin/env python
import os
import sys
as = sys.argv
i = as.index('-L')
as[i] = '--title1'
as[i+1] = '"'+as[i+1]+'"'
i = as.index('-L')
as[i] = '--title2'
as[i+1] = '"'+as[i+1]+'"'
as[0] = 'xxdiff'
as.remove('-u')
os.system(' '.join(as))
this alias saves some typing:
alias svndiff 'svn diff --diff-cmd ~/local/bin/svnxxdiff'
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment