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

login
register
mail settings
Submitter Yuya Nishihara
Date Jan. 5, 2017, 2:48 p.m.
Message ID <1ae32abc1f69e33392d7.1483627727@mimosa>
Download mbox | patch
Permalink /patch/18104/
State Accepted
Headers show

Comments

Yuya Nishihara - Jan. 5, 2017, 2:48 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@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.

Patch

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