MAC OS X 下配置 SVN 使用 DiffMerge
记录几个脚本便于以后查看diff-wrap.py:
#!/usr/bin/env python
import sys
import os
# Configure your favorite three-way diff program here.
DIFF3 = "/Applications/DiffMerge.app/Contents/MacOS/DiffMerge"
# Subversion provides the paths we need as the last three parameters.
LABEL_LEFT = sys.argv[-5]
LABEL_RIGHT = sys.argv[-3]
FILE_LEFT = sys.argv[-2]
FILE_RIGHT = sys.argv[-1]
# Call the three-way diff command (change the following line to make
# sense for your three-way diff program).
cmd =
os.execv(cmd, cmd)
diff3-wrap.py:
#!/usr/bin/env python
import sys
import os
# Configure your favorite three-way diff program here.
DIFF3 = "/Applications/DiffMerge.app/Contents/MacOS/DiffMerge"
# Subversion provides the paths we need as the last three parameters.
LABEL_MINE = sys.argv[-8]
LABEL_OLDER = sys.argv[-6]
LABEL_YOURS = sys.argv[-4]
FILE_MINE= sys.argv[-3]
FILE_OLDER = sys.argv[-2]
FILE_YOURS = sys.argv[-1]
# Call the three-way diff command (change the following line to make
# sense for your three-way diff program).
cmd =
os.execv(cmd, cmd)
merge-wrap.py:
#!/usr/bin/env python
import sys
import os
# Configure your favorite three-way diff program here.
DIFF3 = "/Applications/DiffMerge.app/Contents/MacOS/DiffMerge"
# Subversion provides the paths we need as the last three parameters.
FILE_BASE = sys.argv
FILE_THEIRS = sys.argv
FILE_MINE = sys.argv
FILE_MERGED = sys.argv
FILE_WCPATH = sys.argv
# Call the three-way diff command (change the following line to make
# sense for your three-way diff program).
cmd =
os.execv(cmd, cmd)
.subversion/config(在下):
diff-cmd = /full-path-to-script-dir/bash-scripts/diff-wrap.py
diff3-cmd = /full-path-to-script-dir/bash-scripts/diff3-wrap.py
diff3-has-program-arg=yes
merge-tool-cmd = /full-path-to-script-dir/bash-scripts/merge-wrap.py
页:
[1]