Summary:
Add the `sparse switchprofile` command, which lets users specify a set of
sparse profiles they would like to switch to. This is equivalent to `hg sparse
reset` followed by `hg sparse enableprofile`, but in a single step.
Reviewed By: farnz
Differential Revision: D10141938
fbshipit-source-id: 5a1e547d21e3246237fffb17f3b512da18fac804
Summary: This lets you find profiles that'll include a given filename.
Reviewed By: markbt
Differential Revision: D7876496
fbshipit-source-id: 3b375e5d8257a80853f854a6be27c74f805687e3
Summary: This lets you select on substrings in fields and paths.
Reviewed By: quark-zju
Differential Revision: D7788826
fbshipit-source-id: f92b8cc646fd36f4cb3b8a4dc6116576db80eb42
Summary: Calculation on how many profiles were hidden is only done when the hint is actually shown.
Reviewed By: quark-zju
Differential Revision: D7774192
fbshipit-source-id: a7196b2cc5640d0a7cb9c4d572e1a31ebfa41598
Summary:
This lets us produce a list of profiles with the title set, or find all profiles that are missing a description.
Convert the 'hidden' filter to use this feature, rather than special-case it in `_discover()`.
Reviewed By: quark-zju
Differential Revision: D7774029
fbshipit-source-id: 3bcba75e6da97bf0e560e11ce1ae7cbcee49ee45
Summary: This is needed to be able to list profiles via SCMQuery, where there is a working copy at the null revision.
Reviewed By: quark-zju
Differential Revision: D7745434
fbshipit-source-id: b5ac236c36f9bafc9e0f305bc0892e0cd8bec628
Summary: If there is a non-existing sparse profile active in .hg/sparse, skip it rather than bail out.
Reviewed By: quark-zju
Differential Revision: D7744957
fbshipit-source-id: 4e6a046c95f5fe6cf49a7093d3443340f70e8e2a
Summary:
```
$ hg sparse explain some/profile
[...]
hint[sparse-explain-verbose]: use 'hg sparse explain --verbose some/profile' to include the total file size for a give profile
hint[hint-ack]: use 'hg hint --ack sparse-explain-verbose' to silence these hints
```
Differential Revision: D7669896
fbshipit-source-id: c700fbc2f42044a9b15371278305f03e9e6c989f
Summary: Tweak the help output to reflect the now-complete subcommand information.
Differential Revision: D7667900
fbshipit-source-id: a5a04e8bcbfe4a90266c30e25ffd705de0bdc8a9
Summary: We need this to support producing sparse profile stats in a null-revision working copy.
Reviewed By: quark-zju
Differential Revision: D7553022
fbshipit-source-id: b1643f443de5a748bf81ff2df16ace984d59a2c2
Summary:
hg sparse explain wasn't supposed to recurse, not without additional support.
It was the process of gathering stats that overwrote shared mutable structures.
Prevent this from happening again by making these structures immutable.
Differential Revision: D7516570
fbshipit-source-id: 247c60b4bd8d2d22b42c41871e1eb15988820025
Summary:
We were ignoring the actual profile data, and all profiles were given the same .hg/sparse-based hash signature instead.
Error introduced in D7415720
Differential Revision: D7514087
fbshipit-source-id: 56288aaaa2065b031318e7c065ec6310f6cecd37
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
Summary: This command mostly echoes how `hg files` works, albeit simplified somewhat. Given a profile and optional patterns, the files that profile matches are listed.
Reviewed By: quark-zju
Differential Revision: D7431522
fbshipit-source-id: 8e9d1f0d2aa31335f53269f3005875a0cc2e65bf
Summary:
Show the 'impact' of a profile, relative to a non-sparse working copy.
By default, this is the percentage of the total file count; adding --verbose will show the file sizes too.
The defined matchers have been refactored to reuse more of mercurial.match.basematcher, making it easier to reuse these in a wider mercurial context and avoiding repetition of common methods.
Reviewed By: quark-zju
Differential Revision: D7415720
fbshipit-source-id: 4ac3492c61aa70ee71d4bdf8c201b905a345a9d1
Summary: This shows basic details about a template, including base metadata. Once we have support for per-subcommand switches we can add further filtering.
Reviewed By: ryanmce
Differential Revision: D7365794
fbshipit-source-id: 3dd362f099e7f4d6db73c9bda7c24a9f4f2f90ee
Summary:
This is based on the hg show implementation. hg sparse --list-profiles is not yet widely known, so now is the time to move it to a subcommand.
This is the first step in untangling the mess that is the `hg sparse` forest of options.
Currently, all switches on the command are mutually exclusive, except for `—force` and `—template`, which each only apply to a subset of the actions the other switches affect.
Subcommands are the right pattern for mutually-exclusive actions that can accept their own individual switches.
Reviewed By: quark-zju
Differential Revision: D7350928
fbshipit-source-id: d03014cf7edd2f089f670d11465c70940d96c070
Summary: Although the old glob *should* work, in practice the treemanifest matcher seems to have issues with glob:**/ paths, where relglob: works.
Reviewed By: ryanmce
Differential Revision: D7287992
fbshipit-source-id: d3802e730d937eeca7059dac691d8dac5a5de262
Summary: Put titles, if present, into a second 'column' in the plain output.
Differential Revision: D7258046
fbshipit-source-id: dedbb04ecbf0b2262c4c507683262e4b7bef8d70
Summary:
Profiles can now have a [metadata] section, with key-value pairs defining some metadata to be associated with the profile.
This supports multiline entries by starting a continuation line with some whitespace:
```
[metadata]
title = Some cool title
description = A longer description
will be joined with newlines
provided you start with a space
or a tab.
```
Differential Revision: D7257628
fbshipit-source-id: d6b09161d54cb6824f691d07caee83d0f8bd0a84
Summary: We regularly parse multiple profiles, through includes or when discovering. Be clear what profile file caused the issue.
Differential Revision: D7257636
fbshipit-source-id: 1203c13f6c6a4e4d1397ace818aee21b9db38550
Summary:
This echos the change in D7056650; there is no need to special-case
treemanifests here; delegation to the manifest .match method allows the
manifest to apply optimisations when available.
Differential Revision: D7100363
fbshipit-source-id: 66a35850a132f804efb407712d2e4db737c10cff
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.
Depends on D6675329
Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6675344
Summary:
This commit moves most of the stuff in hgext3rd and related tests to
hg-crew/hgext and hg-crew/test respectively.
The things that are not moved are the ones which require some more complex
imports.
Depends on D6675309
Test Plan: - tests are failing at this commit, fixes are in the following commits
Reviewers: #sourcecontrol
Differential Revision: https://phabricator.intern.facebook.com/D6675329