[PATCH 3 of 4] revset: document wdir() as an experimental function

Yuya Nishihara yuya at tcha.org
Thu Jan 5 09:48:47 EST 2017


# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1483624422 -32400
#      Thu Jan 05 22:53:42 2017 +0900
# Node ID 1ae32abc1f69e33392d7f929b8c7130efc915e78
# Parent  8464d3337540ccf9a2a41108f470dff363e46947
revset: document wdir() as an experimental function

Let's resurrect the docstring since our help module can detect the EXPERIMENTAL
tag and display it only if -v is specified.

This patch updates the test added by 015c0d1087a3 since wdir() is now
documented.

diff --git a/mercurial/revset.py b/mercurial/revset.py
--- a/mercurial/revset.py
+++ b/mercurial/revset.py
@@ -2259,9 +2259,9 @@ def user(repo, subset, x):
     """
     return author(repo, subset, x)
 
-# experimental
 @predicate('wdir', safe=True)
 def wdir(repo, subset, x):
+    """Working directory. (EXPERIMENTAL)"""
     # i18n: "wdir" is a keyword
     getargs(x, 0, 0, _("wdir takes no arguments"))
     if node.wdirrev in subset or isinstance(subset, fullreposet):
diff --git a/tests/test-revset.t b/tests/test-revset.t
--- a/tests/test-revset.t
+++ b/tests/test-revset.t
@@ -2809,8 +2809,8 @@ Bogus function with a similar internal n
   [255]
 
 Undocumented functions aren't suggested as similar either
-  $ log 'wdir2()'
-  hg: parse error: unknown identifier: wdir2
+  $ log 'tagged2()'
+  hg: parse error: unknown identifier: tagged2
   [255]
 
 multiple revspecs


More information about the Mercurial-devel mailing list