mercurial/debugcommands.py
changeset 33274 68f3e819d41d
parent 33273 5724aaa99dd6
child 33336 4672db164c98
--- a/mercurial/debugcommands.py	Fri Jun 30 15:02:19 2017 +0200
+++ b/mercurial/debugcommands.py	Fri Jun 30 15:27:19 2017 +0200
@@ -2067,13 +2067,14 @@
         ui.write((' revision %s\n') % v[1])
 
 @command('debugsuccessorssets',
-    [],
+    [('', 'closest', False, _('return closest successors sets only'))],
     _('[REV]'))
-def debugsuccessorssets(ui, repo, *revs):
+def debugsuccessorssets(ui, repo, *revs, **opts):
     """show set of successors for revision
 
     A successors set of changeset A is a consistent group of revisions that
-    succeed A. It contains non-obsolete changesets only.
+    succeed A. It contains non-obsolete changesets only unless closests
+    successors set is set.
 
     In most cases a changeset A has a single successors set containing a single
     successor (changeset A replaced by A').
@@ -2111,7 +2112,9 @@
     for rev in scmutil.revrange(repo, revs):
         ctx = repo[rev]
         ui.write('%s\n'% ctx2str(ctx))
-        for succsset in obsutil.successorssets(repo, ctx.node(), cache=cache):
+        for succsset in obsutil.successorssets(repo, ctx.node(),
+                                                closest=opts['closest'],
+                                                cache=cache):
             if succsset:
                 ui.write('    ')
                 ui.write(node2str(succsset[0]))