Remove the lock file copied during clone (was the source lock file)
authorStephen Darnell
Sat, 27 Aug 2005 19:15:02 -0700
changeset 1114 58371c4c2c8f
parent 1113 6130de75bb2a
child 1115 89f54e72581d
Remove the lock file copied during clone (was the source lock file) Index: hg/mercurial/commands.py ===================================================================
mercurial/commands.py
--- a/mercurial/commands.py	Sat Aug 27 18:55:14 2005 -0700
+++ b/mercurial/commands.py	Sat Aug 27 19:15:02 2005 -0700
@@ -581,10 +581,12 @@
 
         util.copytree(os.path.join(source, ".hg"), os.path.join(dest, ".hg"),
                       copyfile)
-        try:
-            os.unlink(os.path.join(dest, ".hg", "dirstate"))
-        except OSError:
-            pass
+
+        for fn in "dirstate", "lock":
+            try:
+                os.unlink(os.path.join(dest, ".hg", fn))
+            except OSError:
+                pass
 
         repo = hg.repository(ui, dest)