Mercurial > public > mercurial-scm > hg-stable
diff mercurial/scmutil.py @ 37678:5f8f013e7d52
scmutil: rename resolvepartialhexnodeid() to resolvehexnodeidprefix()
I'm going to wrap revlog.shortest() in scmutil. I plan on calling it
shortesthexnodeidprefix(). resolvehexnodeidprefix() matches that
better. Also, "prefix" carries more information than "partial".
Differential Revision: https://phab.mercurial-scm.org/D3309
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Fri, 13 Apr 2018 22:46:37 -0700 |
parents | 41ac707322ba |
children | ab828755e1ea |
line wrap: on
line diff
--- a/mercurial/scmutil.py Fri Apr 13 09:48:22 2018 -0700 +++ b/mercurial/scmutil.py Fri Apr 13 22:46:37 2018 -0700 @@ -434,8 +434,8 @@ hexfunc = short return '%d:%s' % (rev, hexfunc(node)) -def resolvepartialhexnodeid(repo, prefix): - # Uses unfiltered repo because it's faster when then prefix is ambiguous/ +def resolvehexnodeidprefix(repo, prefix): + # Uses unfiltered repo because it's faster when prefix is ambiguous/ # This matches the "shortest" template function. node = repo.unfiltered().changelog._partialmatch(prefix) if node is None: