Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 555:39a1cfb03ebd
Unbreak dirstate debug commands
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Unbreak dirstate debug commands
manifest hash: 0a4081443c954d278062dbfbc205119eab350191
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)
iD8DBQFCxQAJywK+sNU5EO8RAoIvAJ4wYqOWdVtzEL0BClN0+pLNghyS0ACggwmG
05MpMLTY6+VSueiHMwre+UE=
=zo+4
-----END PGP SIGNATURE-----
author | mpm@selenic.com |
---|---|
date | Fri, 01 Jul 2005 00:34:17 -0800 |
parents | 2f515dcfbc24 |
children | bf9d55ed67f6 |
comparison
equal
deleted
inserted
replaced
554:2f515dcfbc24 | 555:39a1cfb03ebd |
---|---|
344 """mark a file as copied or renamed for the next commit""" | 344 """mark a file as copied or renamed for the next commit""" |
345 return repo.copy(*relpath(repo, (source, dest))) | 345 return repo.copy(*relpath(repo, (source, dest))) |
346 | 346 |
347 def debugcheckdirstate(ui, repo): | 347 def debugcheckdirstate(ui, repo): |
348 parent1, parent2 = repo.dirstate.parents() | 348 parent1, parent2 = repo.dirstate.parents() |
349 dc = repo.dirstate.dup() | 349 repo.dirstate.read() |
350 dc = repo.dirstate.map | |
350 keys = dc.keys() | 351 keys = dc.keys() |
351 keys.sort() | 352 keys.sort() |
352 m1n = repo.changelog.read(parent1)[0] | 353 m1n = repo.changelog.read(parent1)[0] |
353 m2n = repo.changelog.read(parent2)[0] | 354 m2n = repo.changelog.read(parent2)[0] |
354 m1 = repo.manifest.read(m1n) | 355 m1 = repo.manifest.read(m1n) |
374 if errors: | 375 if errors: |
375 print ".hg/dirstate inconsistent with current parent's manifest" | 376 print ".hg/dirstate inconsistent with current parent's manifest" |
376 sys.exit(1) | 377 sys.exit(1) |
377 | 378 |
378 def debugdumpdirstate(ui, repo): | 379 def debugdumpdirstate(ui, repo): |
379 dc = repo.dirstate.dup() | 380 repo.dirstate.read() |
381 dc = repo.dirstate.map | |
380 keys = dc.keys() | 382 keys = dc.keys() |
381 keys.sort() | 383 keys.sort() |
382 for file in keys: | 384 for file in keys: |
383 print "%s => %c" % (file, dc[file][0]) | 385 print "%s => %c" % (file, dc[file][0]) |
384 | 386 |