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/03/28 17:58:08 UTC
[39/42] git commit: [#5453] only count commits for incremental
commmits, not full refreshes
[#5453] only count commits for incremental commmits, not full refreshes
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/ddbfd02c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/ddbfd02c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/ddbfd02c
Branch: refs/heads/db/5453
Commit: ddbfd02c348824ec77fbc375198bf67b3c9d480d
Parents: c0eb784
Author: Dave Brondsema <db...@slashdotmedia.com>
Authored: Wed Mar 27 21:04:59 2013 +0000
Committer: Dave Brondsema <db...@slashdotmedia.com>
Committed: Thu Mar 28 16:53:34 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo_refresh.py | 15 ++++++++-------
1 files changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/ddbfd02c/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 63e2bb0..a9c8719 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -111,13 +111,14 @@ def refresh_repo(repo, all_commits=False, notify=True):
if (i+1) % 100 == 0:
log.info('Compute last commit info %d: %s', (i+1), ci._id)
- for commit in commit_ids:
- new = repo.commit(commit)
- user = User.by_email_address(new.committed.email)
- if user is None:
- user = User.by_username(new.committed.name)
- if user is not None:
- g.statsUpdater.newCommit(new, repo.app_config.project, user)
+ if not all_commits:
+ for commit in commit_ids:
+ new = repo.commit(commit)
+ user = User.by_email_address(new.committed.email)
+ if user is None:
+ user = User.by_username(new.committed.name)
+ if user is not None:
+ g.statsUpdater.newCommit(new, repo.app_config.project, user)
log.info('Refresh complete for %s', repo.full_fs_path)
g.post_event(