Patchwork help: clarify ancestors() and descendants() include given set (issue5594)

login
register
mail settings
Submitter Yuya Nishihara
Date June 18, 2017, 2:15 p.m.
Message ID <19d3c58cd7b80484f774.1497795339@mimosa>
Download mbox | patch
Permalink /patch/21479/
State Accepted
Headers show

Comments

Yuya Nishihara - June 18, 2017, 2:15 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1497793616 -32400
#      Sun Jun 18 22:46:56 2017 +0900
# Node ID 19d3c58cd7b80484f774e6dbd7300b8c0e8d5017
# Parent  07d5a503124caed05e1300a5208240764882c831
help: clarify ancestors() and descendants() include given set (issue5594)

Also unified "a changeset" to "changesets".
Augie Fackler - June 19, 2017, 1:44 a.m.
On Sun, Jun 18, 2017 at 11:15:39PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1497793616 -32400
> #      Sun Jun 18 22:46:56 2017 +0900
> # Node ID 19d3c58cd7b80484f774e6dbd7300b8c0e8d5017
> # Parent  07d5a503124caed05e1300a5208240764882c831
> help: clarify ancestors() and descendants() include given set (issue5594)

queued, thanks

Patch

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -369,7 +369,8 @@  def _ancestors(repo, subset, x, followfi
 
 @predicate('ancestors(set)', safe=True)
 def ancestors(repo, subset, x):
-    """Changesets that are ancestors of a changeset in set.
+    """Changesets that are ancestors of changesets in set, including the
+    given changesets themselves.
     """
     return _ancestors(repo, subset, x)
 
@@ -714,7 +715,8 @@  def _descendants(repo, subset, x, follow
 
 @predicate('descendants(set)', safe=True)
 def descendants(repo, subset, x):
-    """Changesets which are descendants of changesets in set.
+    """Changesets which are descendants of changesets in set, including the
+    given changesets themselves.
     """
     return _descendants(repo, subset, x)