Patchwork [2,of,2] obsolete: clarify that 'successorssets' returns the latests successors

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 15, 2015, 8:27 p.m.
Message ID <56d0b34f12829f259dcb.1442348826@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/10511/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 15, 2015, 8:27 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1442347923 25200
#      Tue Sep 15 13:12:03 2015 -0700
# Node ID 56d0b34f12829f259dcb9f53e6c85e1c7285286c
# Parent  bbf3eb4fa7c41270fcc7823240862045da1454a7
obsolete: clarify that 'successorssets' returns the latests successors

We do not return the first successors we found, we returns the latest (non
obsolete  (mostly)) one following the obsolete link transitively. We update the
documentation to make this clean.
Matt Mackall - Sept. 17, 2015, 11:18 p.m.
On Tue, 2015-09-15 at 13:27 -0700, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@fb.com>
> # Date 1442347923 25200
> #      Tue Sep 15 13:12:03 2015 -0700
> # Node ID 56d0b34f12829f259dcb9f53e6c85e1c7285286c
> # Parent  bbf3eb4fa7c41270fcc7823240862045da1454a7
> obsolete: clarify that 'successorssets' returns the latests successors

These are queued for default, thanks.

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -839,11 +839,11 @@  def foreground(repo, nodes):
             foreground = set(repo.set('%ln::', known))
     return set(c.node() for c in foreground)
 
 
 def successorssets(repo, initialnode, cache=None):
-    """Return all set of successors of initial nodes
+    """Return all set of latest successors of initial nodes
 
     The successors set of a changeset A are the group of revisions that succeed
     A. It succeeds A as a consistent whole, each revision being only a partial
     replacement. The successors set contains non-obsolete changesets only.