comparison mercurial/revlogutils/nodemap.py @ 50510:4fe46f96b56b

cli: fix spelling in `debugnodemap` error messages
author Arseniy Alekseyev <aalekseyev@janestreet.com>
date Thu, 18 May 2023 19:37:12 +0100
parents 2e726c934fcd
children d718eddf01d9
comparison
equal deleted inserted replaced
50509:1b73868d17cf 50510:4fe46f96b56b
609 609
610 610
611 def check_data(ui, index, data): 611 def check_data(ui, index, data):
612 """verify that the provided nodemap data are valid for the given idex""" 612 """verify that the provided nodemap data are valid for the given idex"""
613 ret = 0 613 ret = 0
614 ui.status((b"revision in index: %d\n") % len(index)) 614 ui.status((b"revisions in index: %d\n") % len(index))
615 root, __ = parse_data(data) 615 root, __ = parse_data(data)
616 all_revs = set(_all_revisions(root)) 616 all_revs = set(_all_revisions(root))
617 ui.status((b"revision in nodemap: %d\n") % len(all_revs)) 617 ui.status((b"revisions in nodemap: %d\n") % len(all_revs))
618 for r in range(len(index)): 618 for r in range(len(index)):
619 if r not in all_revs: 619 if r not in all_revs:
620 msg = b" revision missing from nodemap: %d\n" % r 620 msg = b" revision missing from nodemap: %d\n" % r
621 ui.write_err(msg) 621 ui.write_err(msg)
622 ret = 1 622 ret = 1
635 ui.write_err(msg) 635 ui.write_err(msg)
636 ret = 1 636 ret = 1
637 637
638 if all_revs: 638 if all_revs:
639 for r in sorted(all_revs): 639 for r in sorted(all_revs):
640 msg = b" extra revision in nodemap: %d\n" % r 640 msg = b" extra revisions in nodemap: %d\n" % r
641 ui.write_err(msg) 641 ui.write_err(msg)
642 ret = 1 642 ret = 1
643 return ret 643 return ret
644 644
645 645