mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
ce6e0dbf64
Summary: Replace `sparse delete` (which deletes an include or exclude rule) with commands that better describe what they do. Also update `include` and `exclude` to additionally remove the rule from the opposite set. It makes no sense for a file to be both included and excluded. Reviewed By: phillco Differential Revision: D10446704 fbshipit-source-id: 8966f7d0e54b1aae737fa0bae9cf35ed7ce88696
53 lines
1.0 KiB
Perl
53 lines
1.0 KiB
Perl
test interaction between sparse and treemanifest (sparse file listing)
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
> [extensions]
|
|
> sparse=$TESTDIR/../hgext/sparse.py
|
|
> treemanifest=
|
|
> [treemanifest]
|
|
> treeonly = True
|
|
> [remotefilelog]
|
|
> reponame = master
|
|
> cachepath = $PWD/hgcache
|
|
> EOF
|
|
|
|
Setup the repository
|
|
|
|
$ hg init myrepo
|
|
$ cd myrepo
|
|
$ touch show
|
|
$ touch hide
|
|
$ mkdir -p subdir/foo/spam subdir/bar/ham hiddensub/foo hiddensub/bar
|
|
$ touch subdir/foo/spam/show
|
|
$ touch subdir/bar/ham/hide
|
|
$ touch hiddensub/foo/spam
|
|
$ touch hiddensub/bar/ham
|
|
$ hg add .
|
|
adding hiddensub/bar/ham
|
|
adding hiddensub/foo/spam
|
|
adding hide
|
|
adding show
|
|
adding subdir/bar/ham/hide
|
|
adding subdir/foo/spam/show
|
|
$ hg commit -m 'Init'
|
|
$ hg sparse include show
|
|
$ hg sparse exclude hide
|
|
$ hg sparse include subdir
|
|
$ hg sparse exclude subdir/foo
|
|
|
|
Test cwd
|
|
|
|
$ hg sparse cwd
|
|
- hiddensub
|
|
- hide
|
|
show
|
|
subdir
|
|
$ cd subdir
|
|
$ hg sparse cwd
|
|
bar
|
|
- foo
|
|
$ hg sparse include foo
|
|
$ hg sparse cwd
|
|
bar
|
|
foo
|