mirror of
https://github.com/facebook/sapling.git
synced 2024-10-06 23:07:18 +03:00
status: update docstring
Summary: - minimize aliases - tweak formatting and wording - use hashes instead of revision numbers Reviewed By: bolinfest Differential Revision: D41271566 fbshipit-source-id: f9190c5d99591f3d2b613685b1a50aba509af284
This commit is contained in:
parent
1f3d804166
commit
0d9527ff6d
@ -5654,7 +5654,7 @@ def show(ui, repo, *args, **opts):
|
||||
|
||||
|
||||
@command(
|
||||
"status|st|sta|stat|statu",
|
||||
"status|st",
|
||||
[
|
||||
("A", "all", None, _("show status of all files")),
|
||||
("m", "modified", None, _("show only modified files")),
|
||||
@ -5675,6 +5675,7 @@ def show(ui, repo, *args, **opts):
|
||||
+ formatteropts,
|
||||
inferrepo=True,
|
||||
cmdtype=readonly,
|
||||
legacyaliases=["sta", "stat", "statu"],
|
||||
)
|
||||
def status(ui, repo, *pats, **opts):
|
||||
revs = opts.get("rev")
|
||||
|
@ -240,35 +240,35 @@ pub fn aliases() -> &'static str {
|
||||
pub fn doc() -> &'static str {
|
||||
r#"list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators::
|
||||
|
||||
M = modified
|
||||
A = added
|
||||
R = removed
|
||||
C = clean
|
||||
! = missing (deleted by a non-hg command, but still tracked)
|
||||
! = missing (deleted by a non-@prog@ command, but still tracked)
|
||||
? = not tracked
|
||||
I = ignored
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed,
|
||||
deleted, or that are unknown (corresponding to the options -mardu).
|
||||
Files that are unmodified, ignored, or the source of a copy/move
|
||||
operation are not listed.
|
||||
deleted, or that are unknown (corresponding to the options ``-mardu``,
|
||||
respectively). Files that are unmodified, ignored, or the source of
|
||||
a copy/move operation are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant
|
||||
flags (like -rd to show only files that are removed or deleted).
|
||||
Additionally, specify -q/--quiet to hide both unknown and ignored
|
||||
flags (like ``-rd`` to show only files that are removed or deleted).
|
||||
Additionally, specify ``-q/--quiet`` to hide both unknown and ignored
|
||||
files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of
|
||||
files to match. To include or exclude files using regular expressions,
|
||||
use -I or -X.
|
||||
To show the status of specific files, provide a list of files to
|
||||
match. To include or exclude files using patterns or filesets, use
|
||||
``-I`` or ``-X``.
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as
|
||||
If ``--rev`` is specified and only one revision is given, it is used as
|
||||
the base revision. If two revisions are given, the differences between
|
||||
them are shown. The --change option can also be used as a shortcut
|
||||
them are shown. The ``--change`` option can also be used as a shortcut
|
||||
to list the changed files of a revision from its first parent.
|
||||
|
||||
.. note::
|
||||
@ -280,19 +280,19 @@ pub fn doc() -> &'static str {
|
||||
|
||||
.. container:: verbose
|
||||
|
||||
The -t/--terse option abbreviates the output by showing only the directory
|
||||
The ``-t/--terse`` option abbreviates the output by showing only the directory
|
||||
name if all the files in it share the same status. The option takes an
|
||||
argument indicating the statuses to abbreviate: 'm' for 'modified', 'a'
|
||||
for 'added', 'r' for 'removed', 'd' for 'deleted', 'u' for 'unknown', 'i'
|
||||
for 'ignored' and 'c' for clean.
|
||||
|
||||
It abbreviates only those statuses which are passed. Note that clean and
|
||||
ignored files are not displayed with '--terse ic' unless the -c/--clean
|
||||
and -i/--ignored options are also used.
|
||||
ignored files are not displayed with ``--terse ic`` unless the ``-c/--clean``
|
||||
and ``-i/--ignored`` options are also used.
|
||||
|
||||
The -v/--verbose option shows information when the repository is in an
|
||||
unfinished merge, shelve, rebase state etc. You can have this behavior
|
||||
turned on by default by enabling the ``commands.status.verbose`` option.
|
||||
The ``-v/--verbose`` option shows information when the repository is in an
|
||||
unfinished merge, shelve, rebase state, etc. You can have this behavior
|
||||
turned on by default by enabling the ``commands.status.verbose`` config option.
|
||||
|
||||
You can skip displaying some of these states by setting
|
||||
``commands.status.skipstates`` to one or more of: 'bisect', 'graft',
|
||||
@ -301,18 +301,18 @@ pub fn doc() -> &'static str {
|
||||
Examples:
|
||||
|
||||
- show changes in the working directory relative to a
|
||||
changeset::
|
||||
commit::
|
||||
|
||||
@prog@ status --rev 9353
|
||||
@prog@ status --rev 88a692db8
|
||||
|
||||
- show changes in the working directory relative to the
|
||||
- show changes in the working copy relative to the
|
||||
current directory (see :prog:`help patterns` for more information)::
|
||||
|
||||
@prog@ status re:
|
||||
|
||||
- show all changes including copies in an existing changeset::
|
||||
- show all changes including copies in a commit::
|
||||
|
||||
@prog@ status --copies --change 9353
|
||||
@prog@ status --copies --change 88a692db8
|
||||
|
||||
- get a NUL separated list of added files, suitable for xargs::
|
||||
|
||||
|
@ -164,7 +164,7 @@ invalid options
|
||||
|
||||
list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators:
|
||||
|
||||
M = modified
|
||||
@ -177,22 +177,21 @@ invalid options
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed, deleted,
|
||||
or that are unknown (corresponding to the options -mardu). Files that are
|
||||
unmodified, ignored, or the source of a copy/move operation are not
|
||||
listed.
|
||||
or that are unknown (corresponding to the options "-mardu", respectively).
|
||||
Files that are unmodified, ignored, or the source of a copy/move operation
|
||||
are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant flags
|
||||
(like -rd to show only files that are removed or deleted). Additionally,
|
||||
specify -q/--quiet to hide both unknown and ignored files.
|
||||
(like "-rd" to show only files that are removed or deleted). Additionally,
|
||||
specify "-q/--quiet" to hide both unknown and ignored files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of files to
|
||||
match. To include or exclude files using regular expressions, use -I or
|
||||
-X.
|
||||
To show the status of specific files, provide a list of files to match. To
|
||||
include or exclude files using patterns or filesets, use "-I" or "-X".
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as the
|
||||
If "--rev" is specified and only one revision is given, it is used as the
|
||||
base revision. If two revisions are given, the differences between them
|
||||
are shown. The --change option can also be used as a shortcut to list the
|
||||
changed files of a revision from its first parent.
|
||||
are shown. The "--change" option can also be used as a shortcut to list
|
||||
the changed files of a revision from its first parent.
|
||||
|
||||
Note:
|
||||
'hg status' might appear to disagree with 'hg diff' if permissions have
|
||||
@ -234,7 +233,7 @@ invalid options
|
||||
|
||||
list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators:
|
||||
|
||||
M = modified
|
||||
@ -247,22 +246,21 @@ invalid options
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed, deleted,
|
||||
or that are unknown (corresponding to the options -mardu). Files that are
|
||||
unmodified, ignored, or the source of a copy/move operation are not
|
||||
listed.
|
||||
or that are unknown (corresponding to the options "-mardu", respectively).
|
||||
Files that are unmodified, ignored, or the source of a copy/move operation
|
||||
are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant flags
|
||||
(like -rd to show only files that are removed or deleted). Additionally,
|
||||
specify -q/--quiet to hide both unknown and ignored files.
|
||||
(like "-rd" to show only files that are removed or deleted). Additionally,
|
||||
specify "-q/--quiet" to hide both unknown and ignored files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of files to
|
||||
match. To include or exclude files using regular expressions, use -I or
|
||||
-X.
|
||||
To show the status of specific files, provide a list of files to match. To
|
||||
include or exclude files using patterns or filesets, use "-I" or "-X".
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as the
|
||||
If "--rev" is specified and only one revision is given, it is used as the
|
||||
base revision. If two revisions are given, the differences between them
|
||||
are shown. The --change option can also be used as a shortcut to list the
|
||||
changed files of a revision from its first parent.
|
||||
are shown. The "--change" option can also be used as a shortcut to list
|
||||
the changed files of a revision from its first parent.
|
||||
|
||||
Note:
|
||||
'hg status' might appear to disagree with 'hg diff' if permissions have
|
||||
@ -304,7 +302,7 @@ invalid options
|
||||
|
||||
list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators:
|
||||
|
||||
M = modified
|
||||
@ -317,22 +315,21 @@ invalid options
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed, deleted,
|
||||
or that are unknown (corresponding to the options -mardu). Files that are
|
||||
unmodified, ignored, or the source of a copy/move operation are not
|
||||
listed.
|
||||
or that are unknown (corresponding to the options "-mardu", respectively).
|
||||
Files that are unmodified, ignored, or the source of a copy/move operation
|
||||
are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant flags
|
||||
(like -rd to show only files that are removed or deleted). Additionally,
|
||||
specify -q/--quiet to hide both unknown and ignored files.
|
||||
(like "-rd" to show only files that are removed or deleted). Additionally,
|
||||
specify "-q/--quiet" to hide both unknown and ignored files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of files to
|
||||
match. To include or exclude files using regular expressions, use -I or
|
||||
-X.
|
||||
To show the status of specific files, provide a list of files to match. To
|
||||
include or exclude files using patterns or filesets, use "-I" or "-X".
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as the
|
||||
If "--rev" is specified and only one revision is given, it is used as the
|
||||
base revision. If two revisions are given, the differences between them
|
||||
are shown. The --change option can also be used as a shortcut to list the
|
||||
changed files of a revision from its first parent.
|
||||
are shown. The "--change" option can also be used as a shortcut to list
|
||||
the changed files of a revision from its first parent.
|
||||
|
||||
Note:
|
||||
'hg status' might appear to disagree with 'hg diff' if permissions have
|
||||
@ -374,7 +371,7 @@ invalid options
|
||||
|
||||
list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators:
|
||||
|
||||
M = modified
|
||||
@ -387,22 +384,21 @@ invalid options
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed, deleted,
|
||||
or that are unknown (corresponding to the options -mardu). Files that are
|
||||
unmodified, ignored, or the source of a copy/move operation are not
|
||||
listed.
|
||||
or that are unknown (corresponding to the options "-mardu", respectively).
|
||||
Files that are unmodified, ignored, or the source of a copy/move operation
|
||||
are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant flags
|
||||
(like -rd to show only files that are removed or deleted). Additionally,
|
||||
specify -q/--quiet to hide both unknown and ignored files.
|
||||
(like "-rd" to show only files that are removed or deleted). Additionally,
|
||||
specify "-q/--quiet" to hide both unknown and ignored files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of files to
|
||||
match. To include or exclude files using regular expressions, use -I or
|
||||
-X.
|
||||
To show the status of specific files, provide a list of files to match. To
|
||||
include or exclude files using patterns or filesets, use "-I" or "-X".
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as the
|
||||
If "--rev" is specified and only one revision is given, it is used as the
|
||||
base revision. If two revisions are given, the differences between them
|
||||
are shown. The --change option can also be used as a shortcut to list the
|
||||
changed files of a revision from its first parent.
|
||||
are shown. The "--change" option can also be used as a shortcut to list
|
||||
the changed files of a revision from its first parent.
|
||||
|
||||
Note:
|
||||
'hg status' might appear to disagree with 'hg diff' if permissions have
|
||||
|
@ -628,7 +628,7 @@ Test command without options
|
||||
|
||||
list files with pending changes
|
||||
|
||||
Show status of files in the repository using the following status
|
||||
Show status of files in the working copy using the following status
|
||||
indicators:
|
||||
|
||||
M = modified
|
||||
@ -641,22 +641,21 @@ Test command without options
|
||||
= origin of the previous file (with --copies)
|
||||
|
||||
By default, shows files that have been modified, added, removed, deleted,
|
||||
or that are unknown (corresponding to the options -mardu). Files that are
|
||||
unmodified, ignored, or the source of a copy/move operation are not
|
||||
listed.
|
||||
or that are unknown (corresponding to the options "-mardu", respectively).
|
||||
Files that are unmodified, ignored, or the source of a copy/move operation
|
||||
are not listed.
|
||||
|
||||
To control the exact statuses that are shown, specify the relevant flags
|
||||
(like -rd to show only files that are removed or deleted). Additionally,
|
||||
specify -q/--quiet to hide both unknown and ignored files.
|
||||
(like "-rd" to show only files that are removed or deleted). Additionally,
|
||||
specify "-q/--quiet" to hide both unknown and ignored files.
|
||||
|
||||
To show the status of specific files, provide an explicit list of files to
|
||||
match. To include or exclude files using regular expressions, use -I or
|
||||
-X.
|
||||
To show the status of specific files, provide a list of files to match. To
|
||||
include or exclude files using patterns or filesets, use "-I" or "-X".
|
||||
|
||||
If --rev is specified, and only one revision is given, it is used as the
|
||||
If "--rev" is specified and only one revision is given, it is used as the
|
||||
base revision. If two revisions are given, the differences between them
|
||||
are shown. The --change option can also be used as a shortcut to list the
|
||||
changed files of a revision from its first parent.
|
||||
are shown. The "--change" option can also be used as a shortcut to list
|
||||
the changed files of a revision from its first parent.
|
||||
|
||||
Note:
|
||||
'hg status' might appear to disagree with 'hg diff' if permissions have
|
||||
|
Loading…
Reference in New Issue
Block a user