Remove the lock file copied during clone (was the source lock file)
Index: hg/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)