##// END OF EJS Templates
tests: avoid unnecessarily looking inside .hg/ in test-narrow*...
Martin von Zweigbergk -
r38873:fa64a229 default
parent child Browse files
Show More
@@ -30,10 +30,8 b' narrow clone a file, f10'
30 30 store
31 31 testonly-simplestore (reposimplestore !)
32 32
33 $ cat .hg/narrowspec
34 [includes]
35 path:dir/src/f10
36 [excludes]
33 $ hg tracked
34 I path:dir/src/f10
37 35 $ hg update
38 36 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
39 37 $ find * | sort
@@ -55,11 +53,9 b' narrow clone a directory, tests/, except'
55 53 added 40 changesets with 19 changes to 19 files
56 54 new changesets *:* (glob)
57 55 $ cd narrowdir
58 $ cat .hg/narrowspec
59 [includes]
60 path:dir/tests
61 [excludes]
62 path:dir/tests/t19
56 $ hg tracked
57 I path:dir/tests
58 X path:dir/tests/t19
63 59 $ hg update
64 60 19 files updated, 0 files merged, 0 files removed, 0 files unresolved
65 61 $ find * | sort
@@ -97,11 +93,9 b' narrow clone everything but a directory '
97 93 added 40 changesets with 20 changes to 20 files
98 94 new changesets *:* (glob)
99 95 $ cd narrowroot
100 $ cat .hg/narrowspec
101 [includes]
102 path:.
103 [excludes]
104 path:dir/tests
96 $ hg tracked
97 I path:.
98 X path:dir/tests
105 99 $ hg update
106 100 20 files updated, 0 files merged, 0 files removed, 0 files unresolved
107 101 $ find * | sort
@@ -34,10 +34,8 b' narrow clone a file, f10'
34 34 store
35 35 testonly-simplestore (reposimplestore !)
36 36
37 $ cat .hg/narrowspec
38 [includes]
39 path:dir/src/f10
40 [excludes]
37 $ hg tracked
38 I path:dir/src/f10
41 39 $ hg tracked
42 40 I path:dir/src/f10
43 41 $ hg update
@@ -69,11 +67,9 b' narrow clone a directory, tests/, except'
69 67 added 21 changesets with 19 changes to 19 files
70 68 new changesets *:* (glob)
71 69 $ cd narrowdir
72 $ cat .hg/narrowspec
73 [includes]
74 path:dir/tests
75 [excludes]
76 path:dir/tests/t19
70 $ hg tracked
71 I path:dir/tests
72 X path:dir/tests/t19
77 73 $ hg tracked
78 74 I path:dir/tests
79 75 X path:dir/tests/t19
@@ -114,11 +110,9 b' narrow clone everything but a directory '
114 110 added 21 changesets with 20 changes to 20 files
115 111 new changesets *:* (glob)
116 112 $ cd narrowroot
117 $ cat .hg/narrowspec
118 [includes]
119 path:.
120 [excludes]
121 path:dir/tests
113 $ hg tracked
114 I path:.
115 X path:dir/tests
122 116 $ hg tracked
123 117 I path:.
124 118 X path:dir/tests
@@ -27,16 +27,16 b''
27 27
28 28 $ mkdir outside
29 29 $ echo other_contents > outside/f2
30 $ grep outside .hg/narrowspec
30 $ hg tracked | grep outside
31 31 [1]
32 $ grep outside .hg/dirstate
32 $ hg files | grep outside
33 33 [1]
34 34 $ hg status
35 35
36 36 `hg status` did not add outside.
37 $ grep outside .hg/narrowspec
37 $ hg tracked | grep outside
38 38 [1]
39 $ grep outside .hg/dirstate
39 $ hg files | grep outside
40 40 [1]
41 41
42 42 Unfortunately this is not really a candidate for adding to narrowhg proper,
@@ -115,12 +115,12 b' Do that for patchdir as well.'
115 115 `hg status` will now add outside, but not patchdir.
116 116 $ DIRSTATEINCLUDES=path:outside hg status
117 117 M outside/f2
118 $ grep outside .hg/narrowspec
119 path:outside
120 $ grep outside .hg/dirstate > /dev/null
121 $ grep patchdir .hg/narrowspec
118 $ hg tracked | grep outside
119 I path:outside
120 $ hg files | grep outside > /dev/null
121 $ hg tracked | grep patchdir
122 122 [1]
123 $ grep patchdir .hg/dirstate
123 $ hg files | grep patchdir
124 124 [1]
125 125
126 126 Get rid of the modification to outside/f2.
@@ -142,9 +142,9 b' This patch will not apply cleanly at the'
142 142 1 out of 1 hunks FAILED -- saving rejects to file patchdir/f3.rej
143 143 abort: patch failed to apply
144 144 [255]
145 $ grep patchdir .hg/narrowspec
145 $ hg tracked | grep patchdir
146 146 [1]
147 $ grep patchdir .hg/dirstate > /dev/null
147 $ hg files | grep patchdir > /dev/null
148 148 [1]
149 149
150 150 Let's make it apply cleanly and see that it *did* expand properly
@@ -159,6 +159,6 b" Let's make it apply cleanly and see that"
159 159 applying $TESTTMP/foo.patch
160 160 $ cat patchdir/f3
161 161 patched_this
162 $ grep patchdir .hg/narrowspec
163 path:patchdir
164 $ grep patchdir .hg/dirstate > /dev/null
162 $ hg tracked | grep patchdir
163 I path:patchdir
164 $ hg files | grep patchdir > /dev/null
@@ -88,15 +88,13 b' clone a narrow portion of the master, su'
88 88 4 files updated, 0 files merged, 0 files removed, 0 files unresolved
89 89
90 90 $ cd narrow
91 $ cat .hg/narrowspec
92 [includes]
93 path:dir1
94 path:dir2
95 [excludes]
96 path:dir1/dirA
97 path:dir1/dirB
98 path:dir2/dirA
99 path:dir2/dirB
91 $ hg tracked
92 I path:dir1
93 I path:dir2
94 X path:dir1/dirA
95 X path:dir1/dirB
96 X path:dir2/dirA
97 X path:dir2/dirB
100 98 $ hg manifest -r tip
101 99 dir1/bar
102 100 dir1/dirA/bar
@@ -144,14 +142,12 b' widen the narrow checkout'
144 142 adding file changes
145 143 added 9 changesets with 6 changes to 6 files
146 144 new changesets *:* (glob)
147 $ cat .hg/narrowspec
148 [includes]
149 path:dir1
150 path:dir2
151 [excludes]
152 path:dir1/dirB
153 path:dir2/dirA
154 path:dir2/dirB
145 $ hg tracked
146 I path:dir1
147 I path:dir2
148 X path:dir1/dirB
149 X path:dir2/dirA
150 X path:dir2/dirB
155 151 $ find * | sort
156 152 dir1
157 153 dir1/bar
@@ -206,14 +202,12 b' widen narrow spec again, but exclude a f'
206 202 adding file changes
207 203 added 11 changesets with 7 changes to 7 files
208 204 new changesets *:* (glob)
209 $ cat .hg/narrowspec
210 [includes]
211 path:dir1
212 path:dir2
213 [excludes]
214 path:dir1/dirA/bar
215 path:dir1/dirB
216 path:dir2/dirA
205 $ hg tracked
206 I path:dir1
207 I path:dir2
208 X path:dir1/dirA/bar
209 X path:dir1/dirB
210 X path:dir2/dirA
217 211 $ find * | sort
218 212 dir1
219 213 dir1/bar
@@ -266,14 +260,12 b' widen narrow spec yet again, excluding a'
266 260 adding file changes
267 261 added 13 changesets with 8 changes to 8 files
268 262 new changesets *:* (glob)
269 $ cat .hg/narrowspec
270 [includes]
271 path:dir1
272 path:dir2
273 [excludes]
274 path:dir1/dirA
275 path:dir1/dirA/bar
276 path:dir1/dirB
263 $ hg tracked
264 I path:dir1
265 I path:dir2
266 X path:dir1/dirA
267 X path:dir1/dirA/bar
268 X path:dir1/dirB
277 269 $ find * | sort
278 270 dir1
279 271 dir1/bar
@@ -327,13 +319,11 b' include a directory that was previously '
327 319 adding file changes
328 320 added 13 changesets with 9 changes to 9 files
329 321 new changesets *:* (glob)
330 $ cat .hg/narrowspec
331 [includes]
332 path:dir1
333 path:dir2
334 [excludes]
335 path:dir1/dirA/bar
336 path:dir1/dirB
322 $ hg tracked
323 I path:dir1
324 I path:dir2
325 X path:dir1/dirA/bar
326 X path:dir1/dirB
337 327 $ find * | sort
338 328 dir1
339 329 dir1/bar
General Comments 0
You need to be logged in to leave comments. Login now