summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xmgagnome15
1 files changed, 13 insertions, 2 deletions
diff --git a/mgagnome b/mgagnome
index 8fcbc01..7b58b46 100755
--- a/mgagnome
+++ b/mgagnome
@@ -274,9 +274,19 @@ class SpecFile(object):
if not force: return False
# XXX - os.path.join is hackish
- if subprocess.check_output(["svn", "diff", os.path.join(self.path, '..')]) != '':
+ svn_diff_output = subprocess.check_output(["svn", "diff", os.path.join(self.path, '..')])
+ if svn_diff_output != '':
+ print svn_diff_output
print >>sys.stderr, "ERROR: Package has uncommitted changes!"
- return False
+ if not force:
+ return False
+
+ # Forcing package submission: revert changes
+ try:
+ print >>sys.stderr, "WARNING: Force used; reverting svn changes"
+ subprocess.check_call(["svn", "revert", "-R", os.path.join(self.path, '..')])
+ except subprocess.CalledProcessError:
+ return False
with open(self.path, "rw") as f:
data = f.read()
@@ -327,6 +337,7 @@ class SpecFile(object):
# Check patches still apply
subprocess.check_call(['bm', '-p', '--nodeps'], cwd=self.cwd)
except subprocess.CalledProcessError:
+ # XXX tail -n 15 SPECS/log.$PACKAGE
return False
return True