annotate tests/test-sparse.t @ 51729:278af66e6595

typing: induce pytype to use the standard `attr` instead of the vendored copy What was previously happening with the vendored copy was that pytype would stub out all(?) classes that were decorated with `@attr.s` as `Any`. After this, we get a ton of classes defined, and numerous fields and methods now have proper types.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 23 Jul 2024 19:20:22 -0400
parents 28c0fcff24e5
children 93a533fa04ec
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
1 test sparse
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
3 $ hg init myrepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
4 $ cd myrepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
5 $ cat > .hg/hgrc <<EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
6 > [extensions]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
7 > sparse=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
8 > strip=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
9 > EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
10
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
11 $ echo a > show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
12 $ echo x > hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
13 $ hg ci -Aqm 'initial'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
14
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
15 $ echo b > show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
16 $ echo y > hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
17 $ echo aa > show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
18 $ echo xx > hide2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
19 $ hg ci -Aqm 'two'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
20
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
21 Verify basic --include
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
22
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
23 $ hg up -q 0
50821
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
24
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
25 Test that sparse pattern by default is interpreted as "glob:", and is interpreted relative to the root.
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
26
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
27 $ hg debugsparse --reset
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
28 $ hg debugsparse -X 'foo*bar'
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
29 $ cat .hg/sparse
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
30 [exclude]
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
31 foo*bar
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
32
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
33 $ mk() { mkdir -p "$1"; touch "$1"/"$2"; }
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
34 $ mk 'foo' bar
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
35 $ mk 'foo-bar' x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
36 $ mk 'unanchoredfoo-bar' x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
37 $ mk 'foo*bar' x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
38 $ mk 'dir/foo-bar' x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
39 $ hg status --config rhg.on-unsupported=abort
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
40 ? dir/foo-bar/x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
41 ? foo/bar
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
42 ? unanchoredfoo-bar/x
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
43 $ hg clean -a --no-confirm
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
44 $ rm -r foo*bar
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
45 $ hg debugsparse --reset
28c0fcff24e5 rhg: fix the bug where sparse config is interpreted as relglob instead of glob
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 50725
diff changeset
46
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
47 $ hg debugsparse --include 'hide'
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
48 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
49 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
50 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
51
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
52 Absolute paths outside the repo should just be rejected
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
53
33337
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
54 #if no-windows
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
55 $ hg debugsparse --include /foo/bar
33683
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
56 abort: paths cannot be absolute
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
57 [255]
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
58 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
59
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
60 $ hg debugsparse --include '/root'
33683
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
61 abort: paths cannot be absolute
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
62 [255]
33337
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
63 #else
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
64 TODO: See if this can be made to fail the same way as on Unix
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
65 $ hg debugsparse --include /c/foo/bar
33683
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
66 abort: paths cannot be absolute
33337
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
67 [255]
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
68 $ hg debugsparse --include '$TESTTMP/myrepo/hide'
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
69
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
70 $ hg debugsparse --include '/c/root'
33683
7dcb517122f9 sparse: properly error out when absolute paths are used
Kostia Balytskyi <ikostia@fb.com>
parents: 33496
diff changeset
71 abort: paths cannot be absolute
33337
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
72 [255]
de324547c751 tests: stabilize on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 33332
diff changeset
73 #endif
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
74
33685
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
75 Paths should be treated as cwd-relative, not repo-root-relative
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
76 $ mkdir subdir && cd subdir
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
77 $ hg debugsparse --include path
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
78 $ hg debugsparse
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
79 [include]
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
80 $TESTTMP/myrepo/hide
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
81 hide
33795
cf300c1ad7bf test-sparse: drop unnecessary globs
Matt Harbison <matt_harbison@yahoo.com>
parents: 33685
diff changeset
82 subdir/path
33685
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
83
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
84 $ cd ..
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
85 $ echo hello > subdir/file2.ext
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
86 $ cd subdir
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
87 $ hg debugsparse --include '**.ext' # let us test globs
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
88 $ hg debugsparse --include 'path:abspath' # and a path: pattern
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
89 $ cd ..
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
90 $ hg debugsparse
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
91 [include]
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
92 $TESTTMP/myrepo/hide
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
93 hide
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
94 path:abspath
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
95 subdir/**.ext
33795
cf300c1ad7bf test-sparse: drop unnecessary globs
Matt Harbison <matt_harbison@yahoo.com>
parents: 33685
diff changeset
96 subdir/path
33685
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
97
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
98 $ rm -rf subdir
e1c56486d1aa sparse: treat paths as cwd-relative
Kostia Balytskyi <ikostia@fb.com>
parents: 33683
diff changeset
99
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
100 Verify commiting while sparse includes other files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
101
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
102 $ echo z > hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
103 $ hg ci -Aqm 'edit hide'
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
104 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
105 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
106 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
107 $ hg manifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
108 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
109 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
110
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
111 Verify --reset brings files back
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
112
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
113 $ hg debugsparse --reset
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
114 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
115 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
116 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
117 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
118 $ cat hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
119 z
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
120 $ cat show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
121 a
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
122
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
123 Verify 'hg debugsparse' default output
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
124
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
125 $ hg up -q null
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
126 $ hg debugsparse --include 'show*'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
127
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
128 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
129 [include]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
130 show*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
131
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
132 Verify update only writes included files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
133
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
134 $ hg up -q 0
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
135 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
136 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
137 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
138
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
139 $ hg up -q 1
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
140 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
141 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
142 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
143 show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
144
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
145 Verify status only shows included files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
146
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
147 $ touch hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
148 $ touch hide3
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
149 $ echo c > show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
150 $ hg status
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
151 M show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
152
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
153 Adding an excluded file should fail
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
154
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
155 $ hg add hide3
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
156 abort: cannot add 'hide3' - it is outside the sparse checkout
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
157 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
158 [255]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
159
36200
deb851914fd7 dirstate: drop explicit files that shouldn't match (BC) (issue4679)
Yuya Nishihara <yuya@tcha.org>
parents: 35770
diff changeset
160 But adding a truly excluded file shouldn't count
deb851914fd7 dirstate: drop explicit files that shouldn't match (BC) (issue4679)
Yuya Nishihara <yuya@tcha.org>
parents: 35770
diff changeset
161
deb851914fd7 dirstate: drop explicit files that shouldn't match (BC) (issue4679)
Yuya Nishihara <yuya@tcha.org>
parents: 35770
diff changeset
162 $ hg add hide3 -X hide3
deb851914fd7 dirstate: drop explicit files that shouldn't match (BC) (issue4679)
Yuya Nishihara <yuya@tcha.org>
parents: 35770
diff changeset
163
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
164 Verify deleting sparseness while a file has changes fails
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
165
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
166 $ hg debugsparse --delete 'show*'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
167 pending changes to 'hide'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
168 abort: cannot change sparseness due to pending changes (delete the files or use --force to bring them back dirty)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
169 [255]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
170
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
171 Verify deleting sparseness with --force brings back files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
172
48737
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
173 $ hg debugsparse -f --delete 'show*'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
174 pending changes to 'hide'
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
175 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
176 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
177 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
178 hide2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
179 hide3
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
180 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
181 show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
182 $ hg st
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
183 M hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
184 M show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
185 ? hide3
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
186
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
187 Verify editing sparseness fails if pending changes
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
188
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
189 $ hg debugsparse --include 'show*'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
190 pending changes to 'hide'
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
191 abort: could not update sparseness due to pending changes
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
192 [255]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
193
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
194 Verify adding sparseness hides files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
195
48737
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
196 $ hg debugsparse -f --exclude 'hide*'
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
197 pending changes to 'hide'
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
198 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
199 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
200 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
201 hide3
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
202 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
203 show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
204 $ hg st
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
205 M show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
206
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
207 $ hg up -qC .
33496
258298f4712b sparse: override dirstate.walk() instead of dirstate._ignore
Martin von Zweigbergk <martinvonz@google.com>
parents: 33337
diff changeset
208 TODO: add an option to purge to also purge files outside the sparse config?
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
209 $ hg purge --all --config extensions.purge=
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
210 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
211 .hg
33496
258298f4712b sparse: override dirstate.walk() instead of dirstate._ignore
Martin von Zweigbergk <martinvonz@google.com>
parents: 33337
diff changeset
212 hide
258298f4712b sparse: override dirstate.walk() instead of dirstate._ignore
Martin von Zweigbergk <martinvonz@google.com>
parents: 33337
diff changeset
213 hide3
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
214 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
215 show2
33496
258298f4712b sparse: override dirstate.walk() instead of dirstate._ignore
Martin von Zweigbergk <martinvonz@google.com>
parents: 33337
diff changeset
216 For now, manually remove the files
258298f4712b sparse: override dirstate.walk() instead of dirstate._ignore
Martin von Zweigbergk <martinvonz@google.com>
parents: 33337
diff changeset
217 $ rm hide hide3
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
218
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
219 Verify rebase temporarily includes excluded files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
220
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
221 $ hg rebase -d 1 -r 2 --config extensions.rebase=
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
222 rebasing 2:b91df4f39e75 tip "edit hide"
39527
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 36200
diff changeset
223 temporarily included 2 file(s) in the sparse checkout for merging
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
224 merging hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
225 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
45150
dc5e5577af39 error: unify the error message formats for 'rebase' and 'unshelve'
Daniel Ploch <dploch@google.com>
parents: 44724
diff changeset
226 unresolved conflicts (see 'hg resolve', then 'hg rebase --continue')
45826
21733e8c924f errors: add config that lets user get more detailed exit codes
Martin von Zweigbergk <martinvonz@google.com>
parents: 45771
diff changeset
227 [240]
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
228
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
229 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
230 [exclude]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
231 hide*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
232
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
233 Temporarily Included Files (for merge/rebase):
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
234 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
235
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
236 $ cat hide
48589
a51c522c0064 merge: set custom conflict label for base commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 48588
diff changeset
237 <<<<<<< dest: 39278f7c08a9 - test: two
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
238 y
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
239 =======
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
240 z
48589
a51c522c0064 merge: set custom conflict label for base commit
Martin von Zweigbergk <martinvonz@google.com>
parents: 48588
diff changeset
241 >>>>>>> source: b91df4f39e75 - test: edit hide
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
242
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
243 Verify aborting a rebase cleans up temporary files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
244
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
245 $ hg rebase --abort --config extensions.rebase=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
246 cleaned up 1 temporarily added file(s) from the sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
247 rebase aborted
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
248 $ rm hide.orig
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
249
44724
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
250 $ ls -A
5c2a4f37eace tests: deal with "ls" vs "ls -A" difference on 2BSD derived systems
Joerg Sonnenberger <joerg@bec.de>
parents: 39760
diff changeset
251 .hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
252 show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
253 show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
254
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
255 Verify merge fails if merging excluded files
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
256
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
257 $ hg up -q 1
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
258 $ hg merge -r 2
39527
9db856446298 sparse: add local files to temporaryfiles if they exist out of sparse
Pulkit Goyal <pulkit@yandex-team.ru>
parents: 36200
diff changeset
259 temporarily included 2 file(s) in the sparse checkout for merging
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
260 merging hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
261 warning: conflicts while merging hide! (edit, then use 'hg resolve --mark')
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
262 0 files updated, 0 files merged, 0 files removed, 1 files unresolved
35704
41ef02ba329b merge: add `--abort` flag which can abort the merge
Pulkit Goyal <7895pulkit@gmail.com>
parents: 35393
diff changeset
263 use 'hg resolve' to retry unresolved file merges or 'hg merge --abort' to abandon
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
264 [1]
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
265 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
266 [exclude]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
267 hide*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
268
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
269 Temporarily Included Files (for merge/rebase):
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
270 hide
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
271
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
272 $ hg up -C .
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
273 cleaned up 1 temporarily added file(s) from the sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
274 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
275 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
276 [exclude]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
277 hide*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
278
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
279
48737
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
280 Multiple -I and -X can be passed at once
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
281
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
282 $ hg debugsparse --reset -I '*2' -X 'hide2'
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
283 $ ls -A
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
284 .hg
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
285 hide.orig
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
286 show2
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
287 $ hg debugsparse --reset -X 'hide*'
a6efb9180764 sparse: rework debugsparse's interface
Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
parents: 48589
diff changeset
288
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
289 Verify strip -k resets dirstate correctly
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
290
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
291 $ hg status
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
292 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
293 [exclude]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
294 hide*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
295
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
296 $ hg log -r . -T '{rev}\n' --stat
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
297 1
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
298 hide | 2 +-
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
299 hide2 | 1 +
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
300 show | 2 +-
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
301 show2 | 1 +
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
302 4 files changed, 4 insertions(+), 2 deletions(-)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
303
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
304 $ hg strip -r . -k
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33795
diff changeset
305 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/39278f7c08a9-ce59e002-backup.hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
306 $ hg status
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
307 M show
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
308 ? show2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
309
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
310 Verify rebase succeeds if all changed files are in sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
311
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
312 $ hg commit -Aqm "add show2"
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
313 $ hg rebase -d 1 --config extensions.rebase=
45771
f90a5c211251 rebase: change and standarize template for rebase's one-line summary
Martin von Zweigbergk <martinvonz@google.com>
parents: 45150
diff changeset
314 rebasing 2:bdde55290160 tip "add show2"
35393
4441705b7111 tests: remove (glob) annotations that were only for '\' matches
Matt Harbison <matt_harbison@yahoo.com>
parents: 33795
diff changeset
315 saved backup bundle to $TESTTMP/myrepo/.hg/strip-backup/bdde55290160-216ed9c6-rebase.hg
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
316
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
317 Verify log --sparse only shows commits that affect the sparse checkout
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
318
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
319 $ hg log -T '{rev} '
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
320 2 1 0 (no-eol)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
321 $ hg log --sparse -T '{rev} '
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
322 2 0 (no-eol)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
323
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
324 Test status on a file in a subdir
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
325
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
326 $ mkdir -p dir1/dir2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
327 $ touch dir1/dir2/file
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
328 $ hg debugsparse -I dir1/dir2
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
329 $ hg status
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
330 ? dir1/dir2/file
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
331
35742
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
332 Mix files and subdirectories, both "glob:" and unprefixed
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
333
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
334 $ hg debugsparse --reset
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
335 $ touch dir1/notshown
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
336 $ hg commit -A dir1/notshown -m "notshown"
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
337 $ hg debugsparse --include 'dir1/dir2'
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 48737
diff changeset
338 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
35742
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
339 ./
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
340 ./dir1/
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
341 ./dir1/dir2/
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
342 ./dir1/dir2/file
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
343 ./hide.orig
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
344 $ hg debugsparse --delete 'dir1/dir2'
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
345 $ hg debugsparse --include 'glob:dir1/dir2'
50725
7e5be4a7cda7 tests: use grep -E instead of obsolescent egrep
Mads Kiilerich <mads@kiilerich.com>
parents: 48737
diff changeset
346 $ "$PYTHON" $TESTDIR/list-tree.py . | grep -E -v '\.[\/]\.hg'
35742
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
347 ./
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
348 ./dir1/
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
349 ./dir1/dir2/
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
350 ./dir1/dir2/file
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
351 ./hide.orig
7a1806e0daea sparse: --include 'dir1/dir2' should not include 'dir1/*'
Hollis Blanchard <hollis_blanchard@mentor.com>
parents: 35704
diff changeset
352
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
353 Test that add -s adds dirs to sparse profile
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
354
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
355 $ hg debugsparse --reset
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
356 $ hg debugsparse --include empty
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
357 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
358 [include]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
359 empty
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
360
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
361
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
362 $ mkdir add
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
363 $ touch add/foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
364 $ touch add/bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
365 $ hg add add/foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
366 abort: cannot add 'add/foo' - it is outside the sparse checkout
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
367 (include file with `hg debugsparse --include <pattern>` or use `hg add -s <file>` to include file directory while adding)
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
368 [255]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
369 $ hg add -s add/foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
370 $ hg st
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
371 A add/foo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
372 ? add/bar
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
373 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
374 [include]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
375 add
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
376 empty
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
377
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
378 $ hg add -s add/*
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
379 add/foo already tracked!
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
380 $ hg st
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
381 A add/bar
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
382 A add/foo
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
383 $ hg debugsparse
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
384 [include]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
385 add
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
386 empty
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
387
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
388
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
389 $ cd ..
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
390
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
391 Test non-sparse repos work while sparse is loaded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
392 $ hg init sparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
393 $ hg init nonsparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
394 $ cd sparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
395 $ cat > .hg/hgrc <<EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
396 > [extensions]
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
397 > sparse=
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
398 > EOF
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
399 $ cd ../nonsparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
400 $ echo x > x && hg add x && hg commit -qAm x
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
401 $ cd ../sparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
402 $ hg clone ../nonsparserepo ../nonsparserepo2
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
403 updating to branch default
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
404 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
405
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
406 Test debugrebuilddirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
407 $ cd ../sparserepo
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
408 $ touch included
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
409 $ touch excluded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
410 $ hg add included excluded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
411 $ hg commit -m 'a commit' -q
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
412 $ cp .hg/dirstate ../dirstateboth
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
413 $ hg debugsparse -X excluded
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
414 $ cp ../dirstateboth .hg/dirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
415 $ hg debugrebuilddirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
416 $ hg debugdirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
417 n 0 -1 unset included
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
418
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
419 Test debugdirstate --minimal where file is in the parent manifest but not the
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
420 dirstate
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
421 $ hg debugsparse -X included
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
422 $ hg debugdirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
423 $ cp .hg/dirstate ../dirstateallexcluded
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
424 $ hg debugsparse --reset
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
425 $ hg debugsparse -X excluded
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
426 $ cp ../dirstateallexcluded .hg/dirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
427 $ touch includedadded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
428 $ hg add includedadded
39760
7e99b02768ef debugdirstate: deprecate --nodates in favor of --no-dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
429 $ hg debugdirstate --no-dates
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
430 a 0 -1 unset includedadded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
431 $ hg debugrebuilddirstate --minimal
39760
7e99b02768ef debugdirstate: deprecate --nodates in favor of --no-dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
432 $ hg debugdirstate --no-dates
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
433 n 0 -1 unset included
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
434 a 0 -1 * includedadded (glob)
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
435
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
436 Test debugdirstate --minimal where a file is not in parent manifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
437 but in the dirstate. This should take into account excluded files in the
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
438 manifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
439 $ cp ../dirstateboth .hg/dirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
440 $ touch includedadded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
441 $ hg add includedadded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
442 $ touch excludednomanifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
443 $ hg add excludednomanifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
444 $ cp .hg/dirstate ../moreexcluded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
445 $ hg forget excludednomanifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
446 $ rm excludednomanifest
33293
c9cbf4de27ba sparse: rename command to debugsparse
Gregory Szorc <gregory.szorc@gmail.com>
parents: 33289
diff changeset
447 $ hg debugsparse -X excludednomanifest
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
448 $ cp ../moreexcluded .hg/dirstate
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
449 $ hg manifest
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
450 excluded
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
451 included
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
452 We have files in the dirstate that are included and excluded. Some are in the
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
453 manifest and some are not.
39760
7e99b02768ef debugdirstate: deprecate --nodates in favor of --no-dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
454 $ hg debugdirstate --no-dates
47708
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
455 n * excluded (glob)
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
456 a * excludednomanifest (glob)
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
457 n * included (glob)
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
458 a * includedadded (glob)
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
459 $ hg debugrebuilddirstate --minimal
39760
7e99b02768ef debugdirstate: deprecate --nodates in favor of --no-dates
Martin von Zweigbergk <martinvonz@google.com>
parents: 39707
diff changeset
460 $ hg debugdirstate --no-dates
47708
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
461 n * included (glob)
7bdfd88251c0 sparse: apply update with in a `parentchange` context
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 45826
diff changeset
462 a * includedadded (glob)
33289
abd7dedbaa36 sparse: vendor Facebook-developed extension
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff changeset
463