allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [17/46] git commit: [#6030] Set context on commits during compute_diffs to avoid calling guess_repo
Date Wed, 03 Apr 2013 17:26:46 GMT
[#6030] Set context on commits during compute_diffs to avoid calling guess_repo

Signed-off-by: Cory Johns <cjohns@slashdotmedia.com>


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

Branch: refs/heads/cj/5879
Commit: 92607ab47540f1017f5b78cc1eba4796158170f2
Parents: 39079c5
Author: Cory Johns <cjohns@slashdotmedia.com>
Authored: Tue Apr 2 14:18:14 2013 +0000
Committer: Cory Johns <cjohns@slashdotmedia.com>
Committed: Tue Apr 2 14:18:14 2013 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo_refresh.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/92607ab4/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 539df2a..2e176af 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -94,7 +94,9 @@ def refresh_repo(repo, all_commits=False, notify=True):
     # with caching.
     if repo._refresh_precompute:
         for i, oid in enumerate(commit_ids):
-            ci = CommitDoc.m.find(dict(_id=oid), validate=False).next()
+            cid = CommitDoc.m.find(dict(_id=oid), validate=False).next()
+            ci = mapper(Commit).create(cid, dict(instrument=False))
+            ci.set_context(repo)
             compute_diffs(repo._id, cache, ci)
             if (i+1) % 100 == 0:
                 log.info('Compute diffs %d: %s', (i+1), ci._id)


Mime
View raw message