1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00

Resurrect merge_cmd variable after it got removed in the past

In case diff3 returns something except 0 or 1, osc errors out because the
variable merge_cmd is not defined. It used to exist, but got removed in the
past and is reintroduced via this commit.
This commit is contained in:
Dan Čermák 2019-09-20 21:53:23 +02:00
parent e7e91709ef
commit 40c480e9ef
No known key found for this signature in database
GPG Key ID: E632C3380610D1C5

View File

@ -1683,8 +1683,8 @@ class Package:
# diff3 OPTIONS... MINE OLDER YOURS
ret = -1
with open(filename, 'w') as f:
ret = run_external('diff3', '-m', '-E', myfilename,
storefilename, upfilename, stdout=f)
args = ('-m', '-E', myfilename, storefilename, upfilename)
ret = run_external('diff3', *args, stdout=f)
# "An exit status of 0 means `diff3' was successful, 1 means some
# conflicts were found, and 2 means trouble."
@ -1703,6 +1703,7 @@ class Package:
self.write_conflictlist()
return 'C'
else:
merge_cmd = 'diff3 ' + ' '.join(args)
raise oscerr.ExtRuntimeError('diff3 failed with exit code: %s' % ret, merge_cmd)
def update_local_filesmeta(self, revision=None):