diff mercurial/commands.py @ 4250:ca639faa38a2

Merge with crew-stable.
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Mon, 19 Mar 2007 19:16:35 -0300
parents 0d51eb296fb9 89075f106414
children fe0fe0b4d73b
line wrap: on
line diff
--- a/mercurial/commands.py	Mon Mar 19 09:36:06 2007 -0700
+++ b/mercurial/commands.py	Mon Mar 19 19:16:35 2007 -0300
@@ -765,7 +765,11 @@
     if not rev2:
         rev2 = hex(nullid)
 
-    repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
+    wlock = repo.wlock()
+    try:
+        repo.dirstate.setparents(repo.lookup(rev1), repo.lookup(rev2))
+    finally:
+        wlock.release()
 
 def debugstate(ui, repo):
     """show the contents of the current dirstate"""