comparison mercurial/configitems.py @ 38842:503f936489dd

lookup: add option to disambiguate prefix within revset When resolving a nodeid prefix that is not unique within the repo and the user has configured a revset that they want to disambiguate within, we now try to look up within that revset before we fail. If there is a unique match within the revset, we use that. This is of course most effective at allowing a short prefix if the revset contains few nodes. For most of our internal users at Google, "not public()" is sufficiently small that a hex digit or two is enough. The implementation is currently pretty slow, but good enough for small revsets (which is the expected use case). The scan in the revset is linear. We may want to use a prefix tree if we want to allow users to use a larger revset. Credit for the idea goes to Kyle Lippincott. Differential Revision: https://phab.mercurial-scm.org/D4037
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 28 Mar 2018 09:36:02 -0700
parents f8732e33bcbc
children 7848f284b211
comparison
equal deleted inserted replaced
38841:df0873ab5c14 38842:503f936489dd
588 default=True, 588 default=True,
589 ) 589 )
590 coreconfigitem('experimental', 'revlogv2', 590 coreconfigitem('experimental', 'revlogv2',
591 default=None, 591 default=None,
592 ) 592 )
593 coreconfigitem('experimental', 'revisions.disambiguatewithin',
594 default=None,
595 )
593 coreconfigitem('experimental', 'single-head-per-branch', 596 coreconfigitem('experimental', 'single-head-per-branch',
594 default=False, 597 default=False,
595 ) 598 )
596 coreconfigitem('experimental', 'sshserver.support-v2', 599 coreconfigitem('experimental', 'sshserver.support-v2',
597 default=False, 600 default=False,