Created
April 29, 2011 15:39
-
-
Save zbeekman/948481 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import string | |
MERGE = "emacs" | |
QFLAG = "-Q" | |
EVAL = "--eval" | |
EVALFUNC = ["ediff-merge-files-with-ancestor"] | |
# Order of arguments returned by Subversion | |
(base,theirs,mine,working) = tuple(['"' + e + '"' for e in sys.argv[1:5]]) | |
# Order needed by Emacs Ediff | |
funcargs = [theirs,mine,base,"nil",working] | |
evalfuncstr = EVALFUNC.extend(funcargs) | |
evalfuncstr = "(" + string.join(EVALFUNC) + ")" | |
cmd = [MERGE,QFLAG,EVAL,evalfuncstr] | |
os.execvp(cmd[0],cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment