diff mercurial/context.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 1764527af92e
children 6e137da59ad9
line wrap: on
line diff
--- a/mercurial/context.py	Fri Apr 13 09:48:22 2018 -0700
+++ b/mercurial/context.py	Fri Apr 13 22:46:37 2018 -0700
@@ -392,7 +392,7 @@
     #  * If you know that "x" is a branch or in some other namespace,
     #    use the appropriate mechanism for that namespace
     #  * If you know that "x" is a hex nodeid prefix, use
-    #    repo[scmutil.resolvepartialhexnodeid(repo, x)]
+    #    repo[scmutil.resolvehexnodeidprefix(repo, x)]
     #  * If "x" is a string that can be any of the above, but you don't want
     #    to allow general revsets (perhaps because "x" may come from a remote
     #    user and the revset may be too costly), use scmutil.revsymbol(repo, x)
@@ -476,7 +476,7 @@
             except KeyError:
                 pass
 
-            self._node = scmutil.resolvepartialhexnodeid(repo, changeid)
+            self._node = scmutil.resolvehexnodeidprefix(repo, changeid)
             if self._node is not None:
                 self._rev = repo.changelog.rev(self._node)
                 changectxdeprecwarn(repo)