##// END OF EJS Templates
scmutil: rename resolvepartialhexnodeid() to resolvehexnodeidprefix()...
Martin von Zweigbergk -
r37696:5f8f013e default
parent child Browse files
Show More
@@ -300,7 +300,7 b' def checkheadshook(ui, repo, node, hookt'
300 hook = checkheadshook
300 hook = checkheadshook
301
301
302 def preupdate(ui, repo, hooktype, parent1, parent2):
302 def preupdate(ui, repo, hooktype, parent1, parent2):
303 p1node = scmutil.resolvepartialhexnodeid(repo, parent1)
303 p1node = scmutil.resolvehexnodeidprefix(repo, parent1)
304 repo.loadeol([p1node])
304 repo.loadeol([p1node])
305 return False
305 return False
306
306
@@ -443,7 +443,7 b' class histeditaction(object):'
443 """ Verifies semantic correctness of the rule"""
443 """ Verifies semantic correctness of the rule"""
444 repo = self.repo
444 repo = self.repo
445 ha = node.hex(self.node)
445 ha = node.hex(self.node)
446 self.node = scmutil.resolvepartialhexnodeid(repo, ha)
446 self.node = scmutil.resolvehexnodeidprefix(repo, ha)
447 if self.node is None:
447 if self.node is None:
448 raise error.ParseError(_('unknown changeset %s listed') % ha[:12])
448 raise error.ParseError(_('unknown changeset %s listed') % ha[:12])
449 self._verifynodeconstraints(prev, expected, seen)
449 self._verifynodeconstraints(prev, expected, seen)
@@ -392,7 +392,7 b' def changectxdeprecwarn(repo):'
392 # * If you know that "x" is a branch or in some other namespace,
392 # * If you know that "x" is a branch or in some other namespace,
393 # use the appropriate mechanism for that namespace
393 # use the appropriate mechanism for that namespace
394 # * If you know that "x" is a hex nodeid prefix, use
394 # * If you know that "x" is a hex nodeid prefix, use
395 # repo[scmutil.resolvepartialhexnodeid(repo, x)]
395 # repo[scmutil.resolvehexnodeidprefix(repo, x)]
396 # * If "x" is a string that can be any of the above, but you don't want
396 # * If "x" is a string that can be any of the above, but you don't want
397 # to allow general revsets (perhaps because "x" may come from a remote
397 # to allow general revsets (perhaps because "x" may come from a remote
398 # user and the revset may be too costly), use scmutil.revsymbol(repo, x)
398 # user and the revset may be too costly), use scmutil.revsymbol(repo, x)
@@ -476,7 +476,7 b' class changectx(basectx):'
476 except KeyError:
476 except KeyError:
477 pass
477 pass
478
478
479 self._node = scmutil.resolvepartialhexnodeid(repo, changeid)
479 self._node = scmutil.resolvehexnodeidprefix(repo, changeid)
480 if self._node is not None:
480 if self._node is not None:
481 self._rev = repo.changelog.rev(self._node)
481 self._rev = repo.changelog.rev(self._node)
482 changectxdeprecwarn(repo)
482 changectxdeprecwarn(repo)
@@ -434,8 +434,8 b' def formatrevnode(ui, rev, node):'
434 hexfunc = short
434 hexfunc = short
435 return '%d:%s' % (rev, hexfunc(node))
435 return '%d:%s' % (rev, hexfunc(node))
436
436
437 def resolvepartialhexnodeid(repo, prefix):
437 def resolvehexnodeidprefix(repo, prefix):
438 # Uses unfiltered repo because it's faster when then prefix is ambiguous/
438 # Uses unfiltered repo because it's faster when prefix is ambiguous/
439 # This matches the "shortest" template function.
439 # This matches the "shortest" template function.
440 node = repo.unfiltered().changelog._partialmatch(prefix)
440 node = repo.unfiltered().changelog._partialmatch(prefix)
441 if node is None:
441 if node is None:
General Comments 0
You need to be logged in to leave comments. Login now