incubator-allura-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From john...@apache.org
Subject git commit: [#4691] Removed short-circuit of LCD fall-back for testing
Date Thu, 24 Jan 2013 14:59:26 GMT
Updated Branches:
  refs/heads/cj/4691 79c306fef -> 37c57535a


[#4691] Removed short-circuit of LCD fall-back for testing

Signed-off-by: Cory Johns <johnsca@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/37c57535
Tree: http://git-wip-us.apache.org/repos/asf/incubator-allura/tree/37c57535
Diff: http://git-wip-us.apache.org/repos/asf/incubator-allura/diff/37c57535

Branch: refs/heads/cj/4691
Commit: 37c57535ad6517fd631e27efdf35fc07c2f11cbd
Parents: 79c306f
Author: Cory Johns <johnsca@geek.net>
Authored: Thu Jan 24 14:58:26 2013 +0000
Committer: Cory Johns <johnsca@geek.net>
Committed: Thu Jan 24 14:58:34 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/37c57535/Allura/allura/model/repo.py
----------------------------------------------------------------------
diff --git a/Allura/allura/model/repo.py b/Allura/allura/model/repo.py
index 4828852..f1dfaaf 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):


Mime
View raw message