comparison mercurial/scmutil.py @ 37868:69de3c3de036

directaccess: use resolvehexnodeidprefix() instead of _partialmatch() Same reasoning as previous commit: I want to make resolvehexnodeidprefix() move complex and don't want to duplicate that code in directaccess. Differential Revision: https://phab.mercurial-scm.org/D3463
author Martin von Zweigbergk <martinvonz@google.com>
date Mon, 07 May 2018 12:18:09 -0700
parents da083d9fafab
children 73a74f29eb87
comparison
equal deleted inserted replaced
37867:0a79fb64118e 37868:69de3c3de036
1539 revs = set() 1539 revs = set()
1540 unfi = repo.unfiltered() 1540 unfi = repo.unfiltered()
1541 unficl = unfi.changelog 1541 unficl = unfi.changelog
1542 cl = repo.changelog 1542 cl = repo.changelog
1543 tiprev = len(unficl) 1543 tiprev = len(unficl)
1544 pmatch = unficl._partialmatch
1545 allowrevnums = repo.ui.configbool('experimental', 'directaccess.revnums') 1544 allowrevnums = repo.ui.configbool('experimental', 'directaccess.revnums')
1546 for s in symbols: 1545 for s in symbols:
1547 try: 1546 try:
1548 n = int(s) 1547 n = int(s)
1549 if n <= tiprev: 1548 if n <= tiprev:
1555 continue 1554 continue
1556 except ValueError: 1555 except ValueError:
1557 pass 1556 pass
1558 1557
1559 try: 1558 try:
1560 s = pmatch(s) 1559 s = resolvehexnodeidprefix(unfi, s)
1561 except (error.LookupError, error.WdirUnsupported): 1560 except (error.LookupError, error.WdirUnsupported):
1562 s = None 1561 s = None
1563 1562
1564 if s is not None: 1563 if s is not None:
1565 rev = unficl.rev(s) 1564 rev = unficl.rev(s)