dagop: fix documentation of reachableroots
authorValentin Gatien-Baron <vgatien-baron@janestreet.com>
Mon, 10 Jun 2019 11:40:43 -0400
changeset 42445 3e42fc243741
parent 42444 f33d3ee110da
child 42446 055c3e2c44f0
dagop: fix documentation of reachableroots The previous revset couldn't be correct as it is symmetric in <roots> and <heads>, but reachableroots has no such symmetry. It makes a difference with for instance reachableroots(2, 3) where 2 and 3 are both children of 1. Differential Revision: https://phab.mercurial-scm.org/D6505
mercurial/dagop.py
--- a/mercurial/dagop.py	Tue Jun 11 19:52:16 2019 +0100
+++ b/mercurial/dagop.py	Mon Jun 10 11:40:43 2019 -0400
@@ -260,9 +260,7 @@
                 break
 
 def _reachablerootspure(repo, minroot, roots, heads, includepath):
-    """return (heads(::<roots> and ::<heads>))
-
-    If includepath is True, return (<roots>::<heads>)."""
+    """See reachableroots"""
     if not roots:
         return []
     parentrevs = repo.changelog.parentrevs
@@ -298,7 +296,7 @@
     return reachable
 
 def reachableroots(repo, roots, heads, includepath=False):
-    """return (heads(::<roots> and ::<heads>))
+    """return (heads(::<roots> and <roots>::<heads>))
 
     If includepath is True, return (<roots>::<heads>)."""
     if not roots: