equal
deleted
inserted
replaced
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 |