diff --git a/eden/scm/edenscm/commands/__init__.py b/eden/scm/edenscm/commands/__init__.py index bf94f6f5ae..7c941cf748 100644 --- a/eden/scm/edenscm/commands/__init__.py +++ b/eden/scm/edenscm/commands/__init__.py @@ -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") diff --git a/eden/scm/lib/hgcommands/src/commands/status.rs b/eden/scm/lib/hgcommands/src/commands/status.rs index 746e9d44a6..a4aa5da2e9 100644 --- a/eden/scm/lib/hgcommands/src/commands/status.rs +++ b/eden/scm/lib/hgcommands/src/commands/status.rs @@ -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:: diff --git a/eden/scm/tests/test-alias.t b/eden/scm/tests/test-alias.t index d4ff7e0cf3..3136eb71cb 100644 --- a/eden/scm/tests/test-alias.t +++ b/eden/scm/tests/test-alias.t @@ -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 diff --git a/eden/scm/tests/test-help.t b/eden/scm/tests/test-help.t index 09baa5a5b9..d3898d36a1 100644 --- a/eden/scm/tests/test-help.t +++ b/eden/scm/tests/test-help.t @@ -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