mercurial/localrepo.py
changeset 8072 ecf7795479d5
parent 7948 de377b1a9a84
child 8108 a26d33749bd8
--- a/mercurial/localrepo.py	Thu Apr 16 15:41:25 2009 +0200
+++ b/mercurial/localrepo.py	Wed Apr 15 19:54:22 2009 +0200
@@ -593,8 +593,9 @@
         return self._filter("decode", filename, data)
 
     def transaction(self):
-        if self._transref and self._transref():
-            return self._transref().nest()
+        tr = self._transref and self._transref() or None
+        if tr and tr.running():
+            return tr.nest()
 
         # abort here if the journal already exists
         if os.path.exists(self.sjoin("journal")):