incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [42/43] git commit: [#5453] only count commits for incremental commits, not full refreshes
Date Thu, 04 Apr 2013 18:38:43 GMT
[#5453] only count commits for incremental commits, 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/e81542a2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/e81542a2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/e81542a2

Branch: refs/heads/master
Commit: e81542a2cd132895e549019e1f517f7d0111b4ac
Parents: 2e6c61f
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Wed Mar 27 21:04:59 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Apr 4 18:37:38 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/e81542a2/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 799d3cc..d06e879 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -112,13 +112,14 @@ def refresh_repo(repo, all_commits=False, notify=True, new_clone=False):
             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('repo_refreshed', len(commit_ids), all_commits, new_clone)


Mime
View raw message