compat: avoid using partial node ID in lookup
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 16 Apr 2018 17:11:27 +0200
changeset 3665 0f0f31351d6d
parent 3664 1de6ba0ac6d7
child 3666 af9981930dbd
compat: avoid using partial node ID in lookup This is getting deprecated in 4.6.
hgext3rd/evolve/evolvecmd.py
--- a/hgext3rd/evolve/evolvecmd.py	Mon Apr 16 00:05:54 2018 +0200
+++ b/hgext3rd/evolve/evolvecmd.py	Mon Apr 16 17:11:27 2018 +0200
@@ -508,12 +508,10 @@
     sha1s = re.findall(sha1re, commitmsg)
     unfi = repo.unfiltered()
     for sha1 in sha1s:
-        ctx = None
-        try:
-            ctx = unfi[sha1]
-        except error.RepoLookupError:
+        fullnode = scmutil.resolvepartialhexnodeid(repo, sha1)
+        if fullnode is None:
             continue
-
+        ctx = unfi[fullnode]
         if not ctx.obsolete():
             continue