mercurial/localrepo.py
changeset 6370 6440e25a1ba3
parent 6334 7016f7fb8fe3
child 6371 b2f1d97d10eb
--- a/mercurial/localrepo.py	Sun Mar 23 21:03:24 2008 -0300
+++ b/mercurial/localrepo.py	Sun Mar 23 21:03:24 2008 -0300
@@ -752,6 +752,8 @@
         if files:
             files = util.unique(files)
         try:
+            wlock = self.wlock()
+            lock = self.lock()
             commit = []
             remove = []
             changed = []
@@ -810,8 +812,6 @@
 
             self.hook("precommit", throw=True, parent1=xp1, parent2=xp2)
 
-            wlock = self.wlock()
-            lock = self.lock()
             tr = self.transaction()
             trp = weakref.proxy(tr)