mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
bf9eb9018e
Summary: Some profiles are not for general consumption; they are usually profiles aimed at CI subsystems or similar. These can be hidden from listings by default using a `hidden` key. The value of the key doesn't matter but can be used to explain why it is hidden. Reviewed By: quark-zju Differential Revision: D7433781 fbshipit-source-id: 877cd8698d50dc64cec8da706ab005e1fd786de4
158 lines
7.2 KiB
Perl
158 lines
7.2 KiB
Perl
test sparse subcommands (help, verbose)
|
|
|
|
$ cat > $TESTTMP/subcommands.py <<EOF
|
|
> from __future__ import absolute_import, print_function
|
|
> import sys
|
|
> seen = False
|
|
> for line in sys.stdin:
|
|
> if 'subcommands:' in line:
|
|
> seen = True
|
|
> if seen:
|
|
> print(line, end='')
|
|
> EOF
|
|
$ subcmds () {
|
|
> $PYTHON $TESTTMP/subcommands.py
|
|
> }
|
|
|
|
$ hg init myrepo
|
|
$ cd myrepo
|
|
$ cat > .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> sparse=$TESTDIR/../hgext/fbsparse.py
|
|
> EOF
|
|
|
|
$ hg help sparse | subcmds
|
|
subcommands:
|
|
|
|
list List available sparse profiles
|
|
explain Show information on individual profiles
|
|
files List all files included in a profiles
|
|
include include files in the sparse checkout
|
|
exclude exclude files in the sparse checkout
|
|
delete delete an include/exclude rule
|
|
enableprofile enables the specified profile
|
|
disableprofile disables the specified profile
|
|
reset makes the repo full again
|
|
importrules Directly import sparse profile rules
|
|
clear Clear local sparse rules
|
|
refresh Refreshes the files on disk based on the sparse rules
|
|
cwd List all names in this directory
|
|
|
|
(some details hidden, use --verbose to show complete help)
|
|
|
|
$ hg help sparse --verbose | subcmds
|
|
subcommands:
|
|
|
|
list List available sparse profiles - Show all available sparse
|
|
profiles, with the active profiles marked. However, if a
|
|
profile has a key named `hidden` in it's metadata, the profile
|
|
is excluded from this list unless explicitly active or
|
|
included in an active profile, or when the `--verbose` switch
|
|
is used.
|
|
explain Show information on individual profiles - If --verbose is
|
|
given, calculates the file size impact of a profile (slow).
|
|
files List all files included in a profiles - If files are given to
|
|
match, this command only prints the names of the files in a
|
|
profile that match those patterns.
|
|
include include files in the sparse checkout - The effects of adding
|
|
or deleting an include or exclude rule are applied
|
|
immediately. If applying the new rule would cause a file with
|
|
pending changes to be added or removed, the command will fail.
|
|
Pass --force to force a rule change even with pending changes
|
|
(the changes on disk will be preserved).
|
|
exclude exclude files in the sparse checkout - The effects of adding
|
|
or deleting an include or exclude rule are applied
|
|
immediately. If applying the new rule would cause a file with
|
|
pending changes to be added or removed, the command will fail.
|
|
Pass --force to force a rule change even with pending changes
|
|
(the changes on disk will be preserved).
|
|
delete delete an include/exclude rule - The effects of adding or
|
|
deleting an include or exclude rule are applied immediately.
|
|
If applying the new rule would cause a file with pending
|
|
changes to be added or removed, the command will fail. Pass
|
|
--force to force a rule change even with pending changes (the
|
|
changes on disk will be preserved).
|
|
enableprofile enables the specified profile
|
|
disableprofile disables the specified profile
|
|
reset makes the repo full again
|
|
importrules Directly import sparse profile rules - Accepts a path to a
|
|
file containing rules in the .hgsparse format. This allows
|
|
you to add *include*, *exclude* and *enable* rules in bulk.
|
|
Like the include, exclude and enable subcommands, the changes
|
|
are applied immediately.
|
|
clear Clear local sparse rules - Removes all local include and
|
|
exclude rules, while leaving any enabled profiles in place.
|
|
refresh Refreshes the files on disk based on the sparse rules - This
|
|
is only necessary if .hg/sparse was changed by hand.
|
|
cwd List all names in this directory - The list includes any names
|
|
that are excluded by the current sparse checkout; these are
|
|
annotated with a hyphen ('-') before the name.
|
|
|
|
$ hg sparse --error-nonesuch | subcmds
|
|
hg sparse: option --error-nonesuch not recognized
|
|
subcommands:
|
|
|
|
list List available sparse profiles
|
|
explain Show information on individual profiles
|
|
files List all files included in a profiles
|
|
include include files in the sparse checkout
|
|
exclude exclude files in the sparse checkout
|
|
delete delete an include/exclude rule
|
|
enableprofile enables the specified profile
|
|
disableprofile disables the specified profile
|
|
reset makes the repo full again
|
|
importrules Directly import sparse profile rules
|
|
clear Clear local sparse rules
|
|
refresh Refreshes the files on disk based on the sparse rules
|
|
cwd List all names in this directory
|
|
|
|
(use 'hg sparse -h' to show more help)
|
|
|
|
$ hg sparse --verbose --error-nonesuch | subcmds
|
|
hg sparse: option --error-nonesuch not recognized
|
|
subcommands:
|
|
|
|
list List available sparse profiles
|
|
explain Show information on individual profiles
|
|
files List all files included in a profiles
|
|
include include files in the sparse checkout
|
|
exclude exclude files in the sparse checkout
|
|
delete delete an include/exclude rule
|
|
enableprofile enables the specified profile
|
|
disableprofile disables the specified profile
|
|
reset makes the repo full again
|
|
importrules Directly import sparse profile rules
|
|
clear Clear local sparse rules
|
|
refresh Refreshes the files on disk based on the sparse rules
|
|
cwd List all names in this directory
|
|
|
|
(use 'hg sparse -h' to show more help)
|
|
|
|
$ hg help sparse list
|
|
hg sparse list
|
|
|
|
List available sparse profiles
|
|
|
|
Show all available sparse profiles, with the active profiles marked.
|
|
However, if a profile has a key named 'hidden' in it's metadata, the
|
|
profile is excluded from this list unless explicitly active or included in
|
|
an active profile, or when the '--verbose' switch is used.
|
|
|
|
subcommands:
|
|
|
|
list List available sparse profiles
|
|
explain Show information on individual profiles
|
|
files List all files included in a profiles
|
|
include include files in the sparse checkout
|
|
exclude exclude files in the sparse checkout
|
|
delete delete an include/exclude rule
|
|
enableprofile enables the specified profile
|
|
disableprofile disables the specified profile
|
|
reset makes the repo full again
|
|
importrules Directly import sparse profile rules
|
|
clear Clear local sparse rules
|
|
refresh Refreshes the files on disk based on the sparse rules
|
|
cwd List all names in this directory
|
|
|
|
(some details hidden, use --verbose to show complete help)
|