changeset 5053:47a8ea1eb2c3

del transaction before lock before wlock This way rollbacks happen while the repo is still locked. Deleting lock before wlock is not strictly necessary, but is more consistent with the locking order.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Thu, 02 Aug 2007 01:56:08 -0300
parents a11e8a181bd5
children ec70fd08e16c
files hgext/mq.py mercurial/commands.py mercurial/localrepo.py
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Thu Aug 02 01:56:08 2007 -0300
+++ b/hgext/mq.py	Thu Aug 02 01:56:08 2007 -0300
@@ -455,7 +455,7 @@
                     repo.dirstate.invalidate()
                 raise
         finally:
-            del lock, wlock, tr
+            del tr, lock, wlock
 
     def _apply(self, repo, series, list=False, update_status=True,
                strict=False, patchdir=None, merge=None, all_files={}):
--- a/mercurial/commands.py	Thu Aug 02 01:56:08 2007 -0300
+++ b/mercurial/commands.py	Thu Aug 02 01:56:08 2007 -0300
@@ -1623,7 +1623,7 @@
             finally:
                 os.unlink(tmpname)
     finally:
-        del wlock, lock
+        del lock, wlock
 
 def incoming(ui, repo, source="default", **opts):
     """show new changesets found in source
--- a/mercurial/localrepo.py	Thu Aug 02 01:56:08 2007 -0300
+++ b/mercurial/localrepo.py	Thu Aug 02 01:56:08 2007 -0300
@@ -544,7 +544,7 @@
             else:
                 self.ui.warn(_("no rollback information available\n"))
         finally:
-            del wlock, lock
+            del lock, wlock
 
     def invalidate(self):
         for a in "changelog manifest".split():
@@ -820,7 +820,7 @@
             self.hook("commit", node=hex(n), parent1=xp1, parent2=xp2)
             return n
         finally:
-            del lock, wlock, tr
+            del tr, lock, wlock
 
     def walk(self, node=None, files=[], match=util.always, badmatch=None):
         '''