summaryrefslogtreecommitdiffstats
path: root/mgagnome
diff options
context:
space:
mode:
Diffstat (limited to 'mgagnome')
-rwxr-xr-xmgagnome13
1 files changed, 12 insertions, 1 deletions
diff --git a/mgagnome b/mgagnome
index 2cfc16a..7346a69 100755
--- a/mgagnome
+++ b/mgagnome
@@ -647,7 +647,9 @@ class SpecFile(object):
# try again
patches = self.patches
continue
- sys.exit(1)
+
+ print("ERROR: Problem removing merged patch: %s" % failed_patch, file=sys.stderr)
+ return False
if cmd and len(cmd_output) > LOGLINES:
print('+ %s' % cmd, file=sys.stdout)
@@ -1495,13 +1497,22 @@ def cmd_package_new_version(options, parser):
try:
Downstream.co(package, cwd=root)
except subprocess.CalledProcessError:
+ subprocess.call(['svn', 'revert', '-R', cwd], cwd=cwd)
sys.exit(1)
# SpecFile class handles the actual version+release change
# XXX - module should reflect upstream name, this gives it the package name
s = SpecFile(os.path.join(cwd, "SPECS", "%s.spec" % package), module=package)
print("%s => %s" % (s.version, options.version))
+
+ # XXX - Duplicate check as should not revert changes if specfile has already been changed
+ if not s.ensure_no_local_changes(options.force):
+ sys.exit(1)
+
if not s.update(options.version, force=options.force):
+ # XXX - hack to automatically revert changes when auto upgrading from ftp release list
+ if options.hexdigest is not None:
+ subprocess.call(['svn', 'revert', '-R', cwd], cwd=cwd, stdout=subprocess.DEVNULL)
sys.exit(1)
# Check hash, if given