# HG changeset patch # User mpm@selenic.com # Date 2005-06-10 08:25:04 # Node ID d3400605d24629bb966f5f2d2d13d557175d2e74 # Parent 7c239fad0f27861bf180048583fdeabe4ebce896 hg init: when hardlinking, remove dirstate -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hg init: when hardlinking, remove dirstate manifest hash: 48d32cdfe7eacf17b012226a884384e48377b0d8 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCqU5gywK+sNU5EO8RAmzxAJ4hQUt/qrIcPzuGHf5dazJkKc9wgwCgpqV/ zSC4SHAvJQ2VptJSSVCEOAg= =QVG+ -----END PGP SIGNATURE----- diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -306,6 +306,9 @@ def init(ui, source=None): if link: ui.debug("copying by hardlink\n") os.system("cp -al %s/.hg .hg" % source) + try: + os.remove(".hg/dirstate") + except: pass else: repo = hg.repository(ui, ".", create=1) other = hg.repository(ui, source)