Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 37504:901e749ca0e1
context: extract partial nodeid lookup method to scmutil
We will add another caller soon, and there's a non-obvious reason to
use the unfiltered repo that we don't want to copy across the code
base.
Differential Revision: https://phab.mercurial-scm.org/D3189
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Sun, 08 Apr 2018 08:06:34 -0700 |
parents | d7114f883505 |
children | 8475c9bf096d |
comparison
equal
deleted
inserted
replaced
37503:49a8c2cc7978 | 37504:901e749ca0e1 |
---|---|
448 self._rev = repo.changelog.rev(self._node) | 448 self._rev = repo.changelog.rev(self._node) |
449 return | 449 return |
450 except KeyError: | 450 except KeyError: |
451 pass | 451 pass |
452 | 452 |
453 self._node = repo.unfiltered().changelog._partialmatch(changeid) | 453 self._node = scmutil.resolvepartialhexnodeid(repo, changeid) |
454 if self._node is not None: | 454 if self._node is not None: |
455 self._rev = repo.changelog.rev(self._node) | 455 self._rev = repo.changelog.rev(self._node) |
456 return | 456 return |
457 | 457 |
458 # lookup failed | 458 # lookup failed |