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