mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 08:18:15 +03:00
sparse: use relglob to exclude readme files
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
This commit is contained in:
parent
df8173b17b
commit
efd45069e3
@ -814,7 +814,7 @@ def _discover(ui, repo):
|
||||
matcher = matchmod.match(
|
||||
repo.root, repo.getcwd(),
|
||||
patterns=['path:' + profile_directory],
|
||||
exclude=['**/README.*', '**/README'])
|
||||
exclude=['relglob:README.*', 'relglob:README'])
|
||||
available.update(mf.matches(matcher))
|
||||
|
||||
# sort profiles and read profile metadata as we iterate
|
||||
|
@ -376,6 +376,18 @@ Test profile discovery
|
||||
}
|
||||
]
|
||||
|
||||
The current working directory plays no role in listing profiles:
|
||||
|
||||
$ mkdir otherdir
|
||||
$ cd otherdir
|
||||
$ hg sparse --list-profiles
|
||||
symbols: * = active profile, ~ = transitively included
|
||||
~ profiles/bar/eggs - Base profile including the profiles directory
|
||||
profiles/bar/python
|
||||
profiles/foo/monty
|
||||
* profiles/foo/spam - Profile that only includes another
|
||||
$ cd ..
|
||||
|
||||
Profiles are loaded from the manifest, so excluding a profile directory should
|
||||
not hamper listing.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user