# HG changeset patch # User Pierre-Yves David # Date 1523986946 -7200 # Node ID 51adc7e6a617543e515aa2355627a6ad1a86e0c5 # Parent 9c12b6520a20f5261c9029101d5b2f7b108e39e7 compat: fallback to compatible partial lookup prior to 4.6 diff -r 9c12b6520a20 -r 51adc7e6a617 hgext3rd/evolve/evolvecmd.py --- 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]