incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject [2/2] git commit: [#4955] ticket:181 fixed recursion
Date Wed, 10 Oct 2012 20:16:39 GMT
[#4955] ticket:181 fixed recursion


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

Branch: refs/heads/master
Commit: 2e957530730a2f4d275f633804058784ac20dfb7
Parents: 995547d
Author: Yuriy Arhipov <yuriyarhipovua@yandex.ru>
Authored: Mon Oct 1 02:04:06 2012 +0400
Committer: Cory Johns <johnsca@geek.net>
Committed: Wed Oct 10 20:16:20 2012 +0000

----------------------------------------------------------------------
 Allura/allura/model/repo.py         |    3 ++-
 Allura/allura/model/repo_refresh.py |    7 ++++++-
 2 files changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2e957530/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 2cbae4b..e07de6e 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -616,7 +616,8 @@ def commitlog(commit_ids, skip=0, limit=sys.maxint):
             else:
                 ci_parents[oid] = run.parent_commit_ids
         for oid in run.parent_commit_ids:
-            _visit(oid)
+            if commit_id!=oid:
+                _visit(oid)
 
     def _gen_ids(commit_ids, skip, limit):
         # Traverse the graph in topo order, yielding commit IDs

http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/2e957530/Allura/allura/model/repo_refresh.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo_refresh.py b/Allura/allura/model/repo_refresh.py
index 87e436e..12bf20c 100644
--- a/Allura/allura/model/repo_refresh.py
+++ b/Allura/allura/model/repo_refresh.py
@@ -304,7 +304,12 @@ def compute_diffs(repo_id, tree_cache, rhs_ci):
             for xx in _walk_tree(tree_index[x.id], tree_index):
                 yield xx
 
-    rhs_tree_ids = TreesDoc.m.get(_id=rhs_ci._id).tree_ids
+    treedoc = TreesDoc.m.get(_id=rhs_ci._id)
+    if treedoc:
+        rhs_tree_ids = treedoc.tree_ids
+    else:
+        return tree_cache
+
     if rhs_ci.parent_ids:
         lhs_ci = CommitDoc.m.get(_id=rhs_ci.parent_ids[0])
     else:


Mime
View raw message