You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by jo...@apache.org on 2013/04/02 16:18:32 UTC

git commit: [#6030] Set context on commits during compute_diffs to avoid calling guess_repo

Updated Branches:
  refs/heads/cj/6030 [created] 92607ab47


[#6030] Set context on commits during compute_diffs to avoid calling guess_repo

Signed-off-by: Cory Johns <cj...@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/6030
Commit: 92607ab47540f1017f5b78cc1eba4796158170f2
Parents: 39079c5
Author: Cory Johns <cj...@slashdotmedia.com>
Authored: Tue Apr 2 14:18:14 2013 +0000
Committer: Cory Johns <cj...@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)