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