allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#6231] tarball tasks check for tarball already ready or in progress
Date Mon, 13 May 2013 18:01:57 GMT
Updated Branches:
  refs/heads/master f89c9c10a -> ce5f69a2e


[#6231] tarball tasks check for tarball already ready or in progress


Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ce5f69a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ce5f69a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ce5f69a2

Branch: refs/heads/master
Commit: ce5f69a2ed473513abbc7c46110bb026bd86364f
Parents: f89c9c1
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Mon May 13 16:34:41 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Mon May 13 18:01:27 2013 +0000

----------------------------------------------------------------------
 Allura/allura/tasks/repo_tasks.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ce5f69a2/Allura/allura/tasks/repo_tasks.py
----------------------------------------------------------------------
diff --git a/Allura/allura/tasks/repo_tasks.py b/Allura/allura/tasks/repo_tasks.py
index 7305c2f..837c686 100644
--- a/Allura/allura/tasks/repo_tasks.py
+++ b/Allura/allura/tasks/repo_tasks.py
@@ -124,9 +124,14 @@ def tarball(revision=None):
     log = logging.getLogger(__name__)
     if revision:
         repo = c.app.repo
-        try:
-            repo.tarball(revision)
-        except:
-            log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname,
c.app.config.options.mount_point, revision), exc_info=True)
+        status = repo.get_tarball_status(revision)
+        if status:
+            log.info('Skipping tarball for repository %s:%s rev %s because it is already
%s' %
+                     (c.project.shortname, c.app.config.options.mount_point, revision, status))
+        else:
+            try:
+                repo.tarball(revision)
+            except:
+                log.error('Could not create tarball for repository %s:%s revision %s' % (c.project.shortname,
c.app.config.options.mount_point, revision), exc_info=True)
     else:
         log.warn('Creation of tarball for %s:%s skipped because revision is not specified'
% (c.project.shortname, c.app.config.options.mount_point))


Mime
View raw message