You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2013/05/17 00:30:11 UTC
[20/50] [abbrv] git commit: [#6231] tarball tasks check for tarball
already ready or in progress
[#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/db/6208
Commit: ce5f69a2ed473513abbc7c46110bb026bd86364f
Parents: f89c9c1
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Mon May 13 16:34:41 2013 +0000
Committer: Cory Johns <cj...@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))