Created
July 21, 2019 12:21
-
-
Save Symbolk/02285e24b15146f9669bf2fa27996202 to your computer and use it in GitHub Desktop.
Git custom sub-command to diff with Meld
This file contains hidden or 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 subprocess | |
import os | |
import sys | |
# C:/PROGRA~1/Meld/Meld.exe | |
binaryPath = "meld" | |
base = str(sys.argv[1]) | |
ours = base.replace('base', 'ours') | |
theirs = ours.replace('ours', 'theirs') | |
print(ours) | |
print(base) | |
print(theirs) | |
# subprocess.call([binaryPath, ours, base, theirs]) | |
cmd = "{0} {1} {2} {3}".format(binaryPath, ours, base, theirs) | |
os.system(cmd) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment