incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brond...@apache.org
Subject [1/3] git commit: [#5453] only count commits for incremental commits, not full refreshes
Date Thu, 28 Mar 2013 17:13:26 GMT
Updated Branches:
  refs/heads/db/5453 114ac9c02 -> 2b3bad7d7 (forced update)


[#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/2f96eafd
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/2f96eafd
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/2f96eafd

Branch: refs/heads/db/5453
Commit: 2f96eafdd5fddddfd213a49a6684bed6874e1624
Parents: c0eb784
Author: Dave Brondsema <dbrondsema@slashdotmedia.com>
Authored: Wed Mar 27 21:04:59 2013 +0000
Committer: Dave Brondsema <dbrondsema@slashdotmedia.com>
Committed: Thu Mar 28 17:13:00 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/2f96eafd/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(


Mime
View raw message