You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by tv...@apache.org on 2013/02/05 21:23:34 UTC
[31/42] git commit: [#4691] Removed short-circuit of LCD fall-back
for testing
[#4691] Removed short-circuit of LCD fall-back for testing
Signed-off-by: Cory Johns <jo...@geek.net>
Project: http://git-wip-us.apache.org/repos/asf/incubator-allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-allura/commit/9459a7b2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/9459a7b2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/9459a7b2
Branch: refs/heads/master
Commit: 9459a7b24c696a0ee958d0f5516ca672fe85dfad
Parents: 3b13151
Author: Cory Johns <jo...@geek.net>
Authored: Thu Jan 24 14:58:26 2013 +0000
Committer: Tim Van Steenburgh <tv...@gmail.com>
Committed: Tue Feb 5 20:22:52 2013 +0000
----------------------------------------------------------------------
Allura/allura/model/repo.py | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-allura/blob/9459a7b2/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 3dbdad7..e99db42 100644
--- a/Allura/allura/model/repo.py
+++ b/Allura/allura/model/repo.py
@@ -463,17 +463,18 @@ class Tree(RepoObject):
return self._lcd_map(LastCommit.get(self))
'''
# look for existing new format first
- last_commit = LastCommit.get(self, create=True)
+ last_commit = LastCommit.get(self, create=False)
if last_commit:
- s = session(last_commit)
- if s:
- s.flush(last_commit)
return self._lcd_map(last_commit)
# otherwise, try old format
old_style_results = self.ls_old()
if old_style_results:
return old_style_results
# finally, use the new implentation that auto-vivifies
+ last_commit = LastCommit.get(self, create=True)
+ # ensure that the LCD is saved, even if
+ # there is an error later in the request
+ session(last_commit).flush(last_commit)
return self._lcd_map(LastCommit.get(self))
def _lcd_map(self, lcd):