mercurial/pure/parsers.py
changeset 43602 b56de57c45ce
parent 43600 bd87114ce341
child 43622 02802fa87b74
--- a/mercurial/pure/parsers.py	Sat Nov 09 13:23:51 2019 +0100
+++ b/mercurial/pure/parsers.py	Sat Nov 09 13:23:51 2019 +0100
@@ -65,6 +65,12 @@
         If the node is unknown, raise a RevlogError"""
         return self.nodemap[node]
 
+    def get_rev(self, node):
+        """return a revision for a node
+
+        If the node is unknown, return None"""
+        return self.nodemap.get(node)
+
     def _stripnodes(self, start):
         if 'nodemap' in vars(self):
             for r in range(start, len(self)):