equal
deleted
inserted
replaced
85 templater, |
85 templater, |
86 treediscovery, |
86 treediscovery, |
87 upgrade, |
87 upgrade, |
88 url as urlmod, |
88 url as urlmod, |
89 util, |
89 util, |
|
90 verify, |
90 vfs as vfsmod, |
91 vfs as vfsmod, |
91 wireprotoframing, |
92 wireprotoframing, |
92 wireprotoserver, |
93 wireprotoserver, |
93 ) |
94 ) |
94 from .interfaces import repository |
95 from .interfaces import repository |
552 |
553 |
553 |
554 |
554 @command(b'debugcheckstate', [], b'') |
555 @command(b'debugcheckstate', [], b'') |
555 def debugcheckstate(ui, repo): |
556 def debugcheckstate(ui, repo): |
556 """validate the correctness of the current dirstate""" |
557 """validate the correctness of the current dirstate""" |
557 parent1, parent2 = repo.dirstate.parents() |
558 errors = verify.verifier(repo)._verify_dirstate() |
558 m1 = repo[parent1].manifest() |
|
559 m2 = repo[parent2].manifest() |
|
560 errors = 0 |
|
561 for err in repo.dirstate.verify(m1, m2): |
|
562 ui.warn(err) |
|
563 errors += 1 |
|
564 if errors: |
559 if errors: |
565 errstr = _(b".hg/dirstate inconsistent with current parent's manifest") |
560 errstr = _(b"dirstate inconsistent with current parent's manifest") |
566 raise error.Abort(errstr) |
561 raise error.Abort(errstr) |
567 |
562 |
568 |
563 |
569 @command( |
564 @command( |
570 b'debugcolor', |
565 b'debugcolor', |