Patchwork files: change documentation to match its behaviour (issue5276)

login
register
mail settings
Submitter liscju
Date Aug. 26, 2016, 8:26 a.m.
Message ID <48d1019afa6fd5b9260e.1472200017@liscju-VirtualBox>
Download mbox | patch
Permalink /patch/16448/
State Accepted
Headers show

Comments

liscju - Aug. 26, 2016, 8:26 a.m.
# HG changeset patch
# User liscju <piotr.listkiewicz@gmail.com>
# Date 1467704227 -7200
#      Tue Jul 05 09:37:07 2016 +0200
# Node ID 48d1019afa6fd5b9260e46c6a18a95f144e6ee4f
# Parent  b1809f5d7630a3fff0fa715bbd30dba0f07672a8
files: change documentation to match its behaviour (issue5276)

Documentation gave the usage pattern as '[OPTION]... [PATTERN]...'
when the command match given files as relpaths by default.
Augie Fackler - Aug. 29, 2016, 1:32 p.m.
On Fri, Aug 26, 2016 at 10:26:57AM +0200, liscju wrote:
> # HG changeset patch
> # User liscju <piotr.listkiewicz@gmail.com>
> # Date 1467704227 -7200
> #      Tue Jul 05 09:37:07 2016 +0200
> # Node ID 48d1019afa6fd5b9260e46c6a18a95f144e6ee4f
> # Parent  b1809f5d7630a3fff0fa715bbd30dba0f07672a8
> files: change documentation to match its behaviour (issue5276)

Queued this, thanks

>
> Documentation gave the usage pattern as '[OPTION]... [PATTERN]...'
> when the command match given files as relpaths by default.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3904,16 +3904,16 @@ def export(ui, repo, *changesets, **opts
>      [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')),
>       ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
>      ] + walkopts + formatteropts + subrepoopts,
> -    _('[OPTION]... [PATTERN]...'))
> +    _('[OPTION]... [FILE]...'))
>  def files(ui, repo, *pats, **opts):
>      """list tracked files
>
>      Print files under Mercurial control in the working directory or
> -    specified revision whose names match the given patterns (excluding
> -    removed files).
> -
> -    If no patterns are given to match, this command prints the names
> -    of all files under Mercurial control in the working directory.
> +    specified revision for given files (excluding removed files).
> +    Files can be specified as filenames or filesets.
> +
> +    If no files are given to match, this command prints the names
> +    of all files under Mercurial control.
>
>      .. container:: verbose
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3904,16 +3904,16 @@  def export(ui, repo, *changesets, **opts
     [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')),
      ('0', 'print0', None, _('end filenames with NUL, for use with xargs')),
     ] + walkopts + formatteropts + subrepoopts,
-    _('[OPTION]... [PATTERN]...'))
+    _('[OPTION]... [FILE]...'))
 def files(ui, repo, *pats, **opts):
     """list tracked files
 
     Print files under Mercurial control in the working directory or
-    specified revision whose names match the given patterns (excluding
-    removed files).
-
-    If no patterns are given to match, this command prints the names
-    of all files under Mercurial control in the working directory.
+    specified revision for given files (excluding removed files).
+    Files can be specified as filenames or filesets.
+
+    If no files are given to match, this command prints the names
+    of all files under Mercurial control.
 
     .. container:: verbose