obsolete: allow passing a revision to successorssets()
authorDan Villiom Podlaski Christiansen <danchr@gmail.com>
Sun, 04 Aug 2013 13:43:39 +0200
changeset 19615 77d434760857
parent 19614 1d50c69c1f0a
child 19616 f959b60e3025
obsolete: allow passing a revision to successorssets()
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Mon Aug 12 17:44:31 2013 -0500
+++ b/mercurial/obsolete.py	Sun Aug 04 13:43:39 2013 +0200
@@ -496,6 +496,9 @@
     for its live spawn. Code that makes multiple calls to `successorssets`
     *must* use this cache mechanism or suffer terrible performances."""
 
+    if isinstance(initialnode, int):
+        initialnode = repo.unfiltered().changelog.node(initialnode)
+
     succmarkers = repo.obsstore.successors
 
     # Stack of nodes we search successors sets for