mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-30 19:56:14 +01:00
Merge branch 'fix_nonexistent_variable' of https://github.com/dcermak/osc
Fix NameError in Package.mergefile. It got broken in commit
63c2aa3630
("Do not run diff3 in the
shell"). The mergefile method itself needs some love because
opening the file with mode 'r' will break sooner or later (when it
was introduced, it was no problem because we lived in the old python2
world). Also, instead of the newly introduced args variable, we could
re-introduce the merge_cmd variable again.
This commit is contained in:
commit
74e1f47574
@ -1683,8 +1683,8 @@ class Package:
|
|||||||
# diff3 OPTIONS... MINE OLDER YOURS
|
# diff3 OPTIONS... MINE OLDER YOURS
|
||||||
ret = -1
|
ret = -1
|
||||||
with open(filename, 'w') as f:
|
with open(filename, 'w') as f:
|
||||||
ret = run_external('diff3', '-m', '-E', myfilename,
|
args = ('-m', '-E', myfilename, storefilename, upfilename)
|
||||||
storefilename, upfilename, stdout=f)
|
ret = run_external('diff3', *args, stdout=f)
|
||||||
|
|
||||||
# "An exit status of 0 means `diff3' was successful, 1 means some
|
# "An exit status of 0 means `diff3' was successful, 1 means some
|
||||||
# conflicts were found, and 2 means trouble."
|
# conflicts were found, and 2 means trouble."
|
||||||
@ -1703,6 +1703,7 @@ class Package:
|
|||||||
self.write_conflictlist()
|
self.write_conflictlist()
|
||||||
return 'C'
|
return 'C'
|
||||||
else:
|
else:
|
||||||
|
merge_cmd = 'diff3 ' + ' '.join(args)
|
||||||
raise oscerr.ExtRuntimeError('diff3 failed with exit code: %s' % ret, merge_cmd)
|
raise oscerr.ExtRuntimeError('diff3 failed with exit code: %s' % ret, merge_cmd)
|
||||||
|
|
||||||
def update_local_filesmeta(self, revision=None):
|
def update_local_filesmeta(self, revision=None):
|
||||||
|
Loading…
Reference in New Issue
Block a user