changeset 42461:3e42fc243741

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
author Valentin Gatien-Baron <vgatien-baron@janestreet.com>
date Mon, 10 Jun 2019 11:40:43 -0400
parents f33d3ee110da
children 055c3e2c44f0
files mercurial/dagop.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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: