Patchwork dagop: fix docstring of `cutfunc`

login
register
mail settings
Submitter Jun Wu
Date Sept. 3, 2017, 7:54 p.m.
Message ID <75cb2afd931082496524.1504468491@x1c>
Download mbox | patch
Permalink /patch/23650/
State Accepted
Headers show

Comments

Jun Wu - Sept. 3, 2017, 7:54 p.m.
# HG changeset patch
# User Jun Wu <quark@fb.com>
# Date 1504468483 25200
#      Sun Sep 03 12:54:43 2017 -0700
# Node ID 75cb2afd931082496524b47b7dc0f34204b77292
# Parent  68afb88b51bb626cd25440e2df812f2306463b55
dagop: fix docstring of `cutfunc`

I was using `keepfunc`, then found `cutfunc` easier to understand. But
forgot to update the documentation. This patch fixes it.

Maybe it could be applied in-place.
Yuya Nishihara - Sept. 4, 2017, 1:01 p.m.
On Sun, 3 Sep 2017 12:54:51 -0700, Jun Wu wrote:
> # HG changeset patch
> # User Jun Wu <quark@fb.com>
> # Date 1504468483 25200
> #      Sun Sep 03 12:54:43 2017 -0700
> # Node ID 75cb2afd931082496524b47b7dc0f34204b77292
> # Parent  68afb88b51bb626cd25440e2df812f2306463b55
> dagop: fix docstring of `cutfunc`
> 
> I was using `keepfunc`, then found `cutfunc` easier to understand. But
> forgot to update the documentation. This patch fixes it.
> 
> Maybe it could be applied in-place.

Folded this as c6c8a52e28c9, thanks.

Patch

diff --git a/mercurial/dagop.py b/mercurial/dagop.py
--- a/mercurial/dagop.py
+++ b/mercurial/dagop.py
@@ -103,5 +103,5 @@  def revancestors(repo, revs, followfirst
 
     If cutfunc is provided, it will be used to cut the traversal of the DAG.
-    When cutfunc(X) returns False, the DAG traversal stops - revision X and
+    When cutfunc(X) returns True, the DAG traversal stops - revision X and
     X's ancestors in the traversal path will be skipped. This could be an
     optimization sometimes.