diff mercurial/commands.py @ 1114:58371c4c2c8f

Remove the lock file copied during clone (was the source lock file) Index: hg/mercurial/commands.py ===================================================================
author Stephen Darnell
date Sat, 27 Aug 2005 19:15:02 -0700
parents 6130de75bb2a
children 0cdd73b0767c
line wrap: on
line diff
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -581,10 +581,12 @@ def clone(ui, source, dest=None, **opts)
 
         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)