allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tvansteenbu...@apache.org
Subject git commit: [#6030] Set context on commits during compute_diffs to avoid calling guess_repo
Date Tue, 02 Apr 2013 15:56:34 GMT
Updated Branches:
  refs/heads/master 39079c52c -> 92607ab47


[#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/master
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