summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlav Vitters <olav@vitters.nl>2014-07-06 17:52:24 +0200
committerOlav Vitters <olav@vitters.nl>2014-07-06 17:52:24 +0200
commit902966ce25302c39fb7c6a8e2d1376f88fc6ca9d (patch)
treef8295d736e0fc7cd2bcaaecaaef27d8a76b9defd
parent600f03f37a4b299bfd8f366edbbdcbe8fbcb9255 (diff)
downloadmgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar
mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.gz
mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.bz2
mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.tar.xz
mgagnome-902966ce25302c39fb7c6a8e2d1376f88fc6ca9d.zip
retry submission if it fails
-rwxr-xr-xmgagnome14
1 files changed, 12 insertions, 2 deletions
diff --git a/mgagnome b/mgagnome
index 83f5f16..d943ae8 100755
--- a/mgagnome
+++ b/mgagnome
@@ -979,6 +979,16 @@ class Downstream(object):
cmd.append(package)
return subprocess.check_call(cmd, cwd=cwd)
+ @classmethod
+ @retry(subprocess.CalledProcessError)
+ def ci(cls, package, changes, cwd=None):
+ if cwd is None:
+ cwd = os.path.expanduser(cls.PKGROOT)
+
+ cmd = ['mgarepo', 'ci', '-m', changes]
+ return subprocess.check_call(cmd, cwd=cwd)
+
+
def get_downstream_from_upstream(self, upstream, version):
if upstream not in self.tarballs:
raise ValueError("No packages for upstream name: %s" % upstream)
@@ -1307,7 +1317,7 @@ def cmd_clean_spec_multi(args):
# If we made it this far, checkin the changes
if made_changes:
if options.doit:
- subprocess.check_call(['mgarepo', 'ci', '-m', s.changes], cwd=cwd)
+ Downstream.ci(package, s.changes, cwd=cwd)
else:
# show the diff and undo all changes
print s.changes
@@ -1376,7 +1386,7 @@ def cmd_package_new_version(options, parser):
try:
# If we made it this far, checkin the changes
- subprocess.check_call(['mgarepo', 'ci', '-m', s.changes], cwd=cwd)
+ Downstream.ci(package, s.changes, cwd=cwd)
# Submit is optional
if options.submit: