summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2017-02-18 18:12:27 +0100
committerOlav Vitters <olav@vitters.nl>2017-02-18 18:12:27 +0100
commiteea3e33708312357cee7d29bc6a06f4a24ed2e58 (patch)
tree5eeb6d079d6298f3b663f8c9cb004cfb826d2d4b
parent6b4ccbf064ec68dae8573b592ccd41fd56a1e774 (diff)
downloadmgagnome-eea3e33708312357cee7d29bc6a06f4a24ed2e58.tar
mgagnome-eea3e33708312357cee7d29bc6a06f4a24ed2e58.tar.gz
mgagnome-eea3e33708312357cee7d29bc6a06f4a24ed2e58.tar.bz2
mgagnome-eea3e33708312357cee7d29bc6a06f4a24ed2e58.tar.xz
mgagnome-eea3e33708312357cee7d29bc6a06f4a24ed2e58.zip
mention merged patch name instead of its number
-rwxr-xr-xmgagnome9
1 files changed, 6 insertions, 3 deletions
diff --git a/mgagnome b/mgagnome
index 7d95697..df6d89b 100755
--- a/mgagnome
+++ b/mgagnome
@@ -559,7 +559,7 @@ class SpecFile(object):
self._changes.clear()
subprocess.check_call(["svn", "revert", "-R", os.path.join(self.cwd, '..')])
- def remove_patch(self, patchnr):
+ def remove_patch(self, patchnr, info_patchname=None):
"""Remove a patch from the spec file"""
# Uses string as well as numeric comparisons to determine which patch to remove
nrs = [str(patchnr), patchnr]
@@ -579,7 +579,10 @@ class SpecFile(object):
# Overwrite file with new version number
write_file(self.path, data)
- self._changes['dropped merged patch %s' % patchnr] = True
+ if info_patchname:
+ self._changes['dropped merged patch %s' % info_patchname] = True
+ else:
+ self._changes['dropped merged patch %s' % patchnr] = True
subprocess.check_call(['mgarepo', 'sync'], cwd=self.cwd)
return True
@@ -651,7 +654,7 @@ class SpecFile(object):
# If patch was merged, drop it from spec file and rety
print("INFO: Patch has been merged: %s" % failed_patch, file=sys.stdout)
if failed_patch in patches:
- if self.remove_patch(patches[failed_patch][1]):
+ if self.remove_patch(patches[failed_patch][1], failed_patch):
# try again
patches = self.patches
continue