[PATCH 2 of 3 RFC] obsolete: allow passing a revision to successorssets()

Dan Villiom Podlaski Christiansen danchr at gmail.com
Thu Aug 8 02:48:45 CDT 2013


# HG changeset patch
# User Dan Villiom Podlaski Christiansen  <danchr at gmail.com>
# Date 1375616619 -7200
#      Sun Aug 04 13:43:39 2013 +0200
# Node ID b1f7ae28c3e371a70ee363a4fbe5d50063a224fc
# Parent  02c24ad6f4d2d954da11d128280978e25aaa48fd
obsolete: allow passing a revision to successorssets()

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -496,6 +496,9 @@ def successorssets(repo, initialnode, ca
     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


More information about the Mercurial-devel mailing list