diff -r 7c239fad0f27 -r d3400605d246 mercurial/commands.py --- a/mercurial/commands.py Thu Jun 09 09:48:50 2005 -0800 +++ b/mercurial/commands.py Fri Jun 10 00:25:04 2005 -0800 @@ -306,6 +306,9 @@ 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)