mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
08d5465b17
Summary: Adds a sparse checkout extension that allows you to checkout just part of the working copy. This only affects the working copy, it does not affect history, or what is pushed and pulled from the server. The basic api is: hg sparse --include PATTERN... # add a pattern to the sparse checkout hg sparse --exclude PATTERN... # excludes files from the sparse checkout hg sparse --delete PATTERN... # deletes an include/exclude rule hg sparse --enable-profile # enables a predefined sparse profile hg sparse --disable-profile # disables a predefined sparse profile hg sparse --reset # makes the repository full again hg sparse --refresh # refreshes the working copy if .hg/sparse was modified manually hg sparse # show the current sparse rules Test Plan: Added tests. Ran them. Also deploy it to a couple users for a bit without major issues. Reviewers: pyd, sid0, rmcelroy, davidsp, mpm Subscribers: mitrandir, akushner Differential Revision: https://phabricator.fb.com/D1698824
27 lines
560 B
Perl
27 lines
560 B
Perl
test sparse
|
|
|
|
$ hg init myrepo
|
|
$ cd myrepo
|
|
$ cat > .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> sparse=$(dirname $TESTDIR)/sparse.py
|
|
> EOF
|
|
|
|
$ echo foo > foo
|
|
$ echo bar > bar
|
|
$ hg add foo bar
|
|
$ hg commit -m initial
|
|
|
|
$ hg branch feature
|
|
marked working directory as branch feature
|
|
(branches are permanent and global, did you want a bookmark?)
|
|
$ echo bar2 >> bar
|
|
$ hg commit -m 'feature - bar2'
|
|
|
|
$ hg update -q default
|
|
$ hg sparse --exclude 'bar**'
|
|
|
|
$ hg merge feature
|
|
abort: cannot merge because bar is outside the sparse checkout
|
|
[255]
|