##// END OF EJS Templates
tests: fold narrow treemanifest tests into main test file using testcases...
Augie Fackler -
r36101:dc014846 default
parent child Browse files
Show More
@@ -1,5 +1,14 b''
1 #testcases flat tree
2
1 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
2
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
3 create full repo
12 create full repo
4
13
5 $ hg init master
14 $ hg init master
@@ -67,7 +76,8 b' Can commit changes inside. Leaves outsid'
67 created new head
76 created new head
68 $ hg files -r .
77 $ hg files -r .
69 inside/f1
78 inside/f1
70 outside/f1
79 outside/f1 (flat !)
80 outside/ (tree !)
71 Some filesystems (notably FAT/exFAT only store timestamps with 2
81 Some filesystems (notably FAT/exFAT only store timestamps with 2
72 seconds of precision, so by sleeping for 3 seconds, we can ensure that
82 seconds of precision, so by sleeping for 3 seconds, we can ensure that
73 the timestamps of files stored by dirstate will appear older than the
83 the timestamps of files stored by dirstate will appear older than the
@@ -1,6 +1,14 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
@@ -76,7 +84,8 b' TODO: Can merge non-conflicting changes '
76
84
77 $ hg update -q 'desc("modify inside/f1")'
85 $ hg update -q 'desc("modify inside/f1")'
78 $ hg merge 'desc("modify outside/f1")'
86 $ hg merge 'desc("modify outside/f1")'
79 abort: merge affects file 'outside/f1' outside narrow, which is not yet supported
87 abort: merge affects file 'outside/f1' outside narrow, which is not yet supported (flat !)
88 abort: merge affects file 'outside/' outside narrow, which is not yet supported (tree !)
80 (merging in the other direction may work)
89 (merging in the other direction may work)
81 [255]
90 [255]
82
91
@@ -90,5 +99,6 b' Refuses merge of conflicting outside cha'
90
99
91 $ hg update -q 'desc("modify outside/f1")'
100 $ hg update -q 'desc("modify outside/f1")'
92 $ hg merge 'desc("conflicting outside/f1")'
101 $ hg merge 'desc("conflicting outside/f1")'
93 abort: conflict in file 'outside/f1' is outside narrow clone
102 abort: conflict in file 'outside/f1' is outside narrow clone (flat !)
103 abort: conflict in file 'outside/' is outside narrow clone (tree !)
94 [255]
104 [255]
@@ -1,6 +1,14 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
@@ -1,6 +1,14 b''
1 #testcases flat tree
1
2
2 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
3
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
4 create full repo
12 create full repo
5
13
6 $ hg init master
14 $ hg init master
@@ -71,8 +79,10 b' Can strip and recover changesets affecti'
71 o 0 initial
79 o 0 initial
72
80
73 $ hg debugdata -m 1
81 $ hg debugdata -m 1
74 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc)
82 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
75 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc)
83 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
84 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
85 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
76
86
77 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
87 $ rm -f $TESTTMP/narrow/.hg/strip-backup/*-backup.hg
78 $ hg strip .
88 $ hg strip .
@@ -94,8 +104,10 b' Can strip and recover changesets affecti'
94
104
95 Check that hash of file outside narrow spec got restored
105 Check that hash of file outside narrow spec got restored
96 $ hg debugdata -m 2
106 $ hg debugdata -m 2
97 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc)
107 inside/f1\x004d6a634d5ba06331a60c29ee0db8412490a54fcd (esc) (flat !)
98 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc)
108 outside/f1\x0084ba604d54dee1f13310ce3d4ac2e8a36636691a (esc) (flat !)
109 inside\x006a8bc41df94075d501f9740587a0c0e13c170dc5t (esc) (tree !)
110 outside\x00255c2627ebdd3c7dcaa6945246f9b9f02bd45a09t (esc) (tree !)
99
111
100 Also verify we can apply the bundle with 'hg pull':
112 Also verify we can apply the bundle with 'hg pull':
101 $ hg co -r 'desc("modify inside")'
113 $ hg co -r 'desc("modify inside")'
@@ -125,14 +137,17 b' Also verify we can apply the bundle with'
125 date: Thu Jan 01 00:00:00 1970 +0000
137 date: Thu Jan 01 00:00:00 1970 +0000
126 summary: initial
138 summary: initial
127
139
128 changeset: 1:9e48d953700d
140 changeset: 1:9e48d953700d (flat !)
141 changeset: 1:3888164bccf0 (tree !)
129 user: test
142 user: test
130 date: Thu Jan 01 00:00:00 1970 +0000
143 date: Thu Jan 01 00:00:00 1970 +0000
131 summary: modify outside again
144 summary: modify outside again
132
145
133 changeset: 2:f505d5e96aa8
146 changeset: 2:f505d5e96aa8 (flat !)
147 changeset: 2:40b66f95a209 (tree !)
134 tag: tip
148 tag: tip
135 parent: 0:a99f4d53924d
149 parent: 0:a99f4d53924d (flat !)
150 parent: 0:c2a5fabcca3c (tree !)
136 user: test
151 user: test
137 date: Thu Jan 01 00:00:00 1970 +0000
152 date: Thu Jan 01 00:00:00 1970 +0000
138 summary: modify inside
153 summary: modify inside
@@ -1,5 +1,13 b''
1 #testcases flat tree
1 $ . "$TESTDIR/narrow-library.sh"
2 $ . "$TESTDIR/narrow-library.sh"
2
3
4 #if tree
5 $ cat << EOF >> $HGRCPATH
6 > [experimental]
7 > treemanifest = 1
8 > EOF
9 #endif
10
3 $ hg init master
11 $ hg init master
4 $ cd master
12 $ cd master
5 $ cat >> .hg/hgrc <<EOF
13 $ cat >> .hg/hgrc <<EOF
@@ -232,6 +240,7 b' make narrow clone with every third node.'
232 $ hg verify
240 $ hg verify
233 checking changesets
241 checking changesets
234 checking manifests
242 checking manifests
243 checking directory manifests (tree !)
235 crosschecking files in changesets and manifests
244 crosschecking files in changesets and manifests
236 checking files
245 checking files
237 4 files, 8 changesets, 4 total revisions
246 4 files, 8 changesets, 4 total revisions
@@ -276,6 +285,7 b" Verify shouldn't claim the repo is corru"
276 $ hg verify
285 $ hg verify
277 checking changesets
286 checking changesets
278 checking manifests
287 checking manifests
288 checking directory manifests (tree !)
279 crosschecking files in changesets and manifests
289 crosschecking files in changesets and manifests
280 checking files
290 checking files
281 5 files, 9 changesets, 5 total revisions
291 5 files, 9 changesets, 5 total revisions
@@ -1,5 +1,14 b''
1 #testcases flat tree
2
1 $ . "$TESTDIR/narrow-library.sh"
3 $ . "$TESTDIR/narrow-library.sh"
2
4
5 #if tree
6 $ cat << EOF >> $HGRCPATH
7 > [experimental]
8 > treemanifest = 1
9 > EOF
10 #endif
11
3 $ hg init master
12 $ hg init master
4 $ cd master
13 $ cd master
5 $ cat >> .hg/hgrc <<EOF
14 $ cat >> .hg/hgrc <<EOF
@@ -119,6 +128,7 b' Force deletion of local changes'
119 * (glob)
128 * (glob)
120 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
129 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
121 deleting data/d0/f.i
130 deleting data/d0/f.i
131 deleting meta/d0/00manifest.i (tree !)
122 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
132 $ hg log -T "{node|short}: {desc} {outsidenarrow}\n"
123 *: local change to d3 (glob)
133 *: local change to d3 (glob)
124 *: add d10/f outsidenarrow (glob)
134 *: add d10/f outsidenarrow (glob)
@@ -145,6 +155,7 b' Pruned commits affecting removed paths s'
145 looking for local changes to affected paths
155 looking for local changes to affected paths
146 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
156 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
147 deleting data/d0/f.i
157 deleting data/d0/f.i
158 deleting meta/d0/00manifest.i (tree !)
148 Updates off of stripped commit if necessary
159 Updates off of stripped commit if necessary
149 $ hg co -r 'desc("local change to d3")' -q
160 $ hg co -r 'desc("local change to d3")' -q
150 $ echo local change >> d6/f
161 $ echo local change >> d6/f
@@ -159,6 +170,7 b' Updates off of stripped commit if necess'
159 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
170 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
160 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
171 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
161 deleting data/d3/f.i
172 deleting data/d3/f.i
173 deleting meta/d3/00manifest.i (tree !)
162 $ hg log -T '{desc}\n' -r .
174 $ hg log -T '{desc}\n' -r .
163 add d10/f
175 add d10/f
164 Updates to nullid if necessary
176 Updates to nullid if necessary
@@ -178,6 +190,7 b' Updates to nullid if necessary'
178 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
190 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
179 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
191 saved backup bundle to $TESTTMP/narrow-local-changes/.hg/strip-backup/*-narrow.hg (glob)
180 deleting data/d3/f.i
192 deleting data/d3/f.i
193 deleting meta/d3/00manifest.i (tree !)
181 $ hg id
194 $ hg id
182 000000000000
195 000000000000
183 $ cd ..
196 $ cd ..
@@ -197,6 +210,7 b' Can remove last include, making repo emp'
197 searching for changes
210 searching for changes
198 looking for local changes to affected paths
211 looking for local changes to affected paths
199 deleting data/d0/f.i
212 deleting data/d0/f.i
213 deleting meta/d0/00manifest.i (tree !)
200 $ hg tracked
214 $ hg tracked
201 $ hg files
215 $ hg files
202 [1]
216 [1]
@@ -252,6 +266,7 b' https://bitbucket.org/Google/narrowhg/is'
252 searching for changes
266 searching for changes
253 looking for local changes to affected paths
267 looking for local changes to affected paths
254 deleting data/d6/f.i
268 deleting data/d6/f.i
269 deleting meta/d6/00manifest.i (tree !)
255 $ hg tracked
270 $ hg tracked
256 I path:d0
271 I path:d0
257 I path:d3
272 I path:d3
@@ -289,6 +304,7 b' https://bitbucket.org/Google/narrowhg/is'
289 searching for changes
304 searching for changes
290 looking for local changes to affected paths
305 looking for local changes to affected paths
291 deleting data/d0/f.i
306 deleting data/d0/f.i
307 deleting meta/d0/00manifest.i (tree !)
292 $ hg tracked
308 $ hg tracked
293 I path:d3
309 I path:d3
294 I path:d9
310 I path:d9
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now