Use `git mergetool` after error because `-c merge.tool` does not work

This commit is contained in:
ZyX 2014-11-30 03:46:30 +03:00
parent 508f8f5eaa
commit c9964a12f5
1 changed files with 5 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import codecs
import os
import re
from subprocess import check_output, check_call
from subprocess import check_output, check_call, CalledProcessError
from getpass import getpass
from github import Github
@ -50,7 +50,10 @@ def parse_version(s):
def merge(version_string, rev, **kwargs):
check_call(['git', 'checkout', 'master'])
check_call(['git', '-c', 'merge.tool=vimdiff', 'merge', '--no-ff', '--no-commit', '--log', rev])
try:
check_call(['git', 'merge', '--no-ff', '--no-commit', '--log', rev])
except CalledProcessError:
check_call(['git', 'mergetool', '--tool', 'vimdiff2'])
with codecs.open('.setup.py.new', 'w', encoding='utf-8') as NS:
with codecs.open('setup.py', 'r', encoding='utf-8') as OS: