diff hgext3rd/topic/discovery.py @ 4929:bb2b4f6c99dc

compat: compatibility for cl.nodemap.get vs cl.index.get_rev
author Anton Shestakov <av6@dwimlabs.net>
date Wed, 13 Nov 2019 13:47:55 +0700
parents 48b30ff742cb
children 71cccd216b01
line wrap: on
line diff
--- a/hgext3rd/topic/discovery.py	Wed Nov 13 13:43:46 2019 +0700
+++ b/hgext3rd/topic/discovery.py	Wed Nov 13 13:47:55 2019 +0700
@@ -45,7 +45,7 @@
                              publishednode,
                              pushop.remotephases.publicheads)
 
-    rev = repo.unfiltered().changelog.nodemap.get
+    getrev = compat.getgetrev(repo.unfiltered().changelog)
 
     def remotebranchmap():
         # drop topic information from changeset about to be published
@@ -56,7 +56,7 @@
             else:
                 namedbranch = branch.split(b':', 1)[0]
                 for h in heads:
-                    r = rev(h)
+                    r = getrev(h)
                     if r is not None and r in publishedset:
                         result[namedbranch].append(h)
                     else: