diff options
-rwxr-xr-x | mgagnome | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -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 |