comparison mercurial/commands.py @ 300:d3400605d246

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-----
author mpm@selenic.com
date Fri, 10 Jun 2005 00:25:04 -0800
parents 38919e1c254d
children f06a4a3b86a7
comparison
equal deleted inserted replaced
299:7c239fad0f27 300:d3400605d246
304 if d1 == d2: link = 1 304 if d1 == d2: link = 1
305 305
306 if link: 306 if link:
307 ui.debug("copying by hardlink\n") 307 ui.debug("copying by hardlink\n")
308 os.system("cp -al %s/.hg .hg" % source) 308 os.system("cp -al %s/.hg .hg" % source)
309 try:
310 os.remove(".hg/dirstate")
311 except: pass
309 else: 312 else:
310 repo = hg.repository(ui, ".", create=1) 313 repo = hg.repository(ui, ".", create=1)
311 other = hg.repository(ui, source) 314 other = hg.repository(ui, source)
312 cg = repo.getchangegroup(other) 315 cg = repo.getchangegroup(other)
313 repo.addchangegroup(cg) 316 repo.addchangegroup(cg)