Mercurial > evolve
changeset 3674:51adc7e6a617
compat: fallback to compatible partial lookup prior to 4.6
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Tue, 17 Apr 2018 19:42:26 +0200 |
parents | 9c12b6520a20 |
children | 1dccccde82bb |
files | hgext3rd/evolve/evolvecmd.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py Tue Apr 17 18:30:56 2018 +0200 +++ b/hgext3rd/evolve/evolvecmd.py Tue Apr 17 19:42:26 2018 +0200 @@ -508,7 +508,10 @@ sha1s = re.findall(sha1re, commitmsg) unfi = repo.unfiltered() for sha1 in sha1s: - fullnode = scmutil.resolvepartialhexnodeid(unfi, sha1) + if util.safehasattr(scmutil, 'resolvepartialhexnodeid'): # > hg-4.6 + fullnode = scmutil.resolvepartialhexnodeid(unfi, sha1) + else: + fullnode = unfi.changelog.index.partialmatch(sha1) if fullnode is None: continue ctx = unfi[fullnode]