[PATCH] files: change documentation to match its behaviour (issue5276)

Anton Shestakov engored at ya.ru
Tue Jul 5 05:40:08 EDT 2016


05.07.2016, 15:42, "liscju" <piotr.listkiewicz at gmail.com>:
> # HG changeset patch
> # User liscju <piotr.listkiewicz at gmail.com>
> # Date 1467704227 -7200
> # Tue Jul 05 09:37:07 2016 +0200
> # Node ID 923c338aa180db1d6ad83e340aa02b0137269d15
> # Parent 6a98f9408a504be455d4382801610daceac429e6
> 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.
>
> diff --git a/mercurial/commands.py b/mercurial/commands.py
> --- a/mercurial/commands.py
> +++ b/mercurial/commands.py
> @@ -3913,15 +3913,14 @@ 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
> + specified revision for given file names.

What about "(excluding removed files)"?

FWIW, looks like "filename" as a single word is used more often in the codebase (in comments and strings).

> +
> + If no names are given to match, this command prints the names
>      of all files under Mercurial control in the working directory.
>
>      .. container:: verbose

Here's a point that the reporter of issue5276 raised in the first comment: passing explicit filenames to the command is not very useful. Maybe the docs should mention that it is most useful with filesets (and patterns, but those are covered with -I/-X).


More information about the Mercurial-devel mailing list