##// END OF EJS Templates
tests: update monotone output for v1.0 changes
Matt Mackall -
r14394:5b98d741 default
parent child Browse files
Show More
@@ -1,388 +1,388 b''
1 1
2 2 $ "$TESTDIR/hghave" mtn || exit 80
3 3
4 4 Monotone directory is called .monotone on *nix and monotone
5 5 on Windows. Having a variable here ease test patching.
6 6
7 7 $ mtndir=.monotone
8 8 $ echo "[extensions]" >> $HGRCPATH
9 9 $ echo "convert=" >> $HGRCPATH
10 10 $ echo 'graphlog =' >> $HGRCPATH
11 11
12 12 Windows version of monotone home
13 13
14 14 $ APPDATA=$HOME; export APPDATA
15 15
16 16 tedious monotone keys configuration
17 17 The /dev/null redirection is necessary under Windows, or
18 18 it complains about home directory permissions
19 19
20 20 $ mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF
21 21 > passphrase
22 22 > passphrase
23 23 > EOF
24 24 $ cat >> $HOME/$mtndir/monotonerc <<EOF
25 25 > function get_passphrase(keypair_id)
26 26 > return "passphrase"
27 27 > end
28 28 > EOF
29 29
30 30 create monotone repository
31 31
32 32 $ mtn db init --db=repo.mtn
33 33 $ mtn --db=repo.mtn --branch=com.selenic.test setup workingdir
34 34 $ cd workingdir
35 35 $ echo a > a
36 36 $ mkdir dir
37 37 $ echo b > dir/b
38 38 $ echo d > dir/d
39 39 $ python -c 'file("bin", "wb").write("a\\x00b")'
40 40 $ echo c > c
41 41 $ mtn add a dir/b dir/d c bin
42 mtn: adding a to workspace manifest
43 mtn: adding bin to workspace manifest
44 mtn: adding c to workspace manifest
45 mtn: adding dir to workspace manifest
46 mtn: adding dir/b to workspace manifest
47 mtn: adding dir/d to workspace manifest
42 mtn: adding 'a' to workspace manifest
43 mtn: adding 'bin' to workspace manifest
44 mtn: adding 'c' to workspace manifest
45 mtn: adding 'dir' to workspace manifest
46 mtn: adding 'dir/b' to workspace manifest
47 mtn: adding 'dir/d' to workspace manifest
48 48 $ mtn ci -m initialize
49 49 mtn: beginning commit on branch 'com.selenic.test'
50 50 mtn: committed revision 0f6e5e4f2e7d2a8ef312408f57618abf026afd90
51 51
52 52 update monotone working directory
53 53
54 54 $ mtn mv a dir/a
55 mtn: skipping dir, already accounted for in workspace
56 mtn: renaming a to dir/a in workspace manifest
55 mtn: skipping 'dir', already accounted for in workspace
56 mtn: renaming 'a' to 'dir/a' in workspace manifest
57 57 $ echo a >> dir/a
58 58 $ echo b >> dir/b
59 59 $ mtn drop c
60 mtn: dropping c from workspace manifest
60 mtn: dropping 'c' from workspace manifest
61 61 $ python -c 'file("bin", "wb").write("b\\x00c")'
62 62 $ mtn ci -m update1
63 63 mtn: beginning commit on branch 'com.selenic.test'
64 64 mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff
65 65 $ cd ..
66 66
67 67 convert once
68 68
69 69 $ hg convert -s mtn repo.mtn
70 70 assuming destination repo.mtn-hg
71 71 initializing destination repo.mtn-hg repository
72 72 scanning source...
73 73 sorting...
74 74 converting...
75 75 1 initialize
76 76 0 update1
77 77 $ cd workingdir
78 78 $ echo e > e
79 79 $ mtn add e
80 mtn: adding e to workspace manifest
80 mtn: adding 'e' to workspace manifest
81 81 $ mtn drop dir/b
82 mtn: dropping dir/b from workspace manifest
82 mtn: dropping 'dir/b' from workspace manifest
83 83 $ mtn mv bin bin2
84 mtn: renaming bin to bin2 in workspace manifest
84 mtn: renaming 'bin' to 'bin2' in workspace manifest
85 85 $ mtn ci -m 'update2 "with" quotes'
86 86 mtn: beginning commit on branch 'com.selenic.test'
87 87 mtn: committed revision ebe58335d85d8cb176b6d0a12be04f5314b998da
88 88
89 89 test directory move
90 90
91 91 $ mkdir -p dir1/subdir1
92 92 $ mkdir -p dir1/subdir2_other
93 93 $ echo file1 > dir1/subdir1/file1
94 94 $ echo file2 > dir1/subdir2_other/file1
95 95 $ mtn add dir1/subdir1/file1 dir1/subdir2_other/file1
96 mtn: adding dir1 to workspace manifest
97 mtn: adding dir1/subdir1 to workspace manifest
98 mtn: adding dir1/subdir1/file1 to workspace manifest
99 mtn: adding dir1/subdir2_other to workspace manifest
100 mtn: adding dir1/subdir2_other/file1 to workspace manifest
96 mtn: adding 'dir1' to workspace manifest
97 mtn: adding 'dir1/subdir1' to workspace manifest
98 mtn: adding 'dir1/subdir1/file1' to workspace manifest
99 mtn: adding 'dir1/subdir2_other' to workspace manifest
100 mtn: adding 'dir1/subdir2_other/file1' to workspace manifest
101 101 $ mtn ci -m createdir1
102 102 mtn: beginning commit on branch 'com.selenic.test'
103 103 mtn: committed revision a8d62bc04fee4d2936d28e98bbcc81686dd74306
104 104 $ mtn rename dir1/subdir1 dir1/subdir2
105 mtn: skipping dir1, already accounted for in workspace
106 mtn: renaming dir1/subdir1 to dir1/subdir2 in workspace manifest
105 mtn: skipping 'dir1', already accounted for in workspace
106 mtn: renaming 'dir1/subdir1' to 'dir1/subdir2' in workspace manifest
107 107 $ mtn ci -m movedir1
108 108 mtn: beginning commit on branch 'com.selenic.test'
109 109 mtn: committed revision 2c3d241bbbfe538b1b51d910f5676407e3f4d3a6
110 110
111 111 test subdirectory move
112 112
113 113 $ mtn mv dir dir2
114 mtn: renaming dir to dir2 in workspace manifest
114 mtn: renaming 'dir' to 'dir2' in workspace manifest
115 115 $ echo newfile > dir2/newfile
116 116 $ mtn drop dir2/d
117 mtn: dropping dir2/d from workspace manifest
117 mtn: dropping 'dir2/d' from workspace manifest
118 118 $ mtn add dir2/newfile
119 mtn: adding dir2/newfile to workspace manifest
119 mtn: adding 'dir2/newfile' to workspace manifest
120 120 $ mtn ci -m movedir
121 121 mtn: beginning commit on branch 'com.selenic.test'
122 122 mtn: committed revision fdb5a02dae8bfce3a79b3393680af471016e1b4c
123 123
124 124 Test directory removal with empty directory
125 125
126 126 $ mkdir dir2/dir
127 127 $ mkdir dir2/dir/subdir
128 128 $ echo f > dir2/dir/subdir/f
129 129 $ mkdir dir2/dir/emptydir
130 130 $ mtn add --quiet -R dir2/dir
131 131 $ mtn ci -m emptydir
132 132 mtn: beginning commit on branch 'com.selenic.test'
133 133 mtn: committed revision 8bbf76d717001d24964e4604739fdcd0f539fc88
134 134 $ mtn drop -R dir2/dir
135 mtn: dropping dir2/dir/subdir/f from workspace manifest
136 mtn: dropping dir2/dir/subdir from workspace manifest
137 mtn: dropping dir2/dir/emptydir from workspace manifest
138 mtn: dropping dir2/dir from workspace manifest
135 mtn: dropping 'dir2/dir/subdir/f' from workspace manifest
136 mtn: dropping 'dir2/dir/subdir' from workspace manifest
137 mtn: dropping 'dir2/dir/emptydir' from workspace manifest
138 mtn: dropping 'dir2/dir' from workspace manifest
139 139 $ mtn ci -m dropdirectory
140 140 mtn: beginning commit on branch 'com.selenic.test'
141 141 mtn: committed revision 2323d4bc324e6c82628dc04d47a9fd32ad24e322
142 142
143 143 test directory and file move
144 144
145 145 $ mkdir -p dir3/d1
146 146 $ echo a > dir3/a
147 147 $ mtn add dir3/a dir3/d1
148 mtn: adding dir3 to workspace manifest
149 mtn: adding dir3/a to workspace manifest
150 mtn: adding dir3/d1 to workspace manifest
148 mtn: adding 'dir3' to workspace manifest
149 mtn: adding 'dir3/a' to workspace manifest
150 mtn: adding 'dir3/d1' to workspace manifest
151 151 $ mtn ci -m dirfilemove
152 152 mtn: beginning commit on branch 'com.selenic.test'
153 153 mtn: committed revision 47b192f720faa622f48c68d1eb075b26d405aa8b
154 154 $ mtn mv dir3/a dir3/d1/a
155 mtn: skipping dir3/d1, already accounted for in workspace
156 mtn: renaming dir3/a to dir3/d1/a in workspace manifest
155 mtn: skipping 'dir3/d1', already accounted for in workspace
156 mtn: renaming 'dir3/a' to 'dir3/d1/a' in workspace manifest
157 157 $ mtn mv dir3/d1 dir3/d2
158 mtn: skipping dir3, already accounted for in workspace
159 mtn: renaming dir3/d1 to dir3/d2 in workspace manifest
158 mtn: skipping 'dir3', already accounted for in workspace
159 mtn: renaming 'dir3/d1' to 'dir3/d2' in workspace manifest
160 160 $ mtn ci -m dirfilemove2
161 161 mtn: beginning commit on branch 'com.selenic.test'
162 162 mtn: committed revision 8b543a400d3ee7f6d4bb1835b9b9e3747c8cb632
163 163
164 164 test directory move into another directory move
165 165
166 166 $ mkdir dir4
167 167 $ mkdir dir5
168 168 $ echo a > dir4/a
169 169 $ mtn add dir4/a dir5
170 mtn: adding dir4 to workspace manifest
171 mtn: adding dir4/a to workspace manifest
172 mtn: adding dir5 to workspace manifest
170 mtn: adding 'dir4' to workspace manifest
171 mtn: adding 'dir4/a' to workspace manifest
172 mtn: adding 'dir5' to workspace manifest
173 173 $ mtn ci -m dirdirmove
174 174 mtn: beginning commit on branch 'com.selenic.test'
175 175 mtn: committed revision 466e0b2afc7a55aa2b4ab2f57cb240bb6cd66fc7
176 176 $ mtn mv dir5 dir6
177 mtn: renaming dir5 to dir6 in workspace manifest
177 mtn: renaming 'dir5' to 'dir6' in workspace manifest
178 178 $ mtn mv dir4 dir6/dir4
179 mtn: skipping dir6, already accounted for in workspace
180 mtn: renaming dir4 to dir6/dir4 in workspace manifest
179 mtn: skipping 'dir6', already accounted for in workspace
180 mtn: renaming 'dir4' to 'dir6/dir4' in workspace manifest
181 181 $ mtn ci -m dirdirmove2
182 182 mtn: beginning commit on branch 'com.selenic.test'
183 183 mtn: committed revision 3d1f77ebad0c23a5d14911be3b670f990991b749
184 184
185 185 test diverging directory moves
186 186
187 187 $ mkdir -p dir7/dir9/dir8
188 188 $ echo a > dir7/dir9/dir8/a
189 189 $ echo b > dir7/dir9/b
190 190 $ echo c > dir7/c
191 191 $ mtn add -R dir7
192 mtn: adding dir7 to workspace manifest
193 mtn: adding dir7/c to workspace manifest
194 mtn: adding dir7/dir9 to workspace manifest
195 mtn: adding dir7/dir9/b to workspace manifest
196 mtn: adding dir7/dir9/dir8 to workspace manifest
197 mtn: adding dir7/dir9/dir8/a to workspace manifest
192 mtn: adding 'dir7' to workspace manifest
193 mtn: adding 'dir7/c' to workspace manifest
194 mtn: adding 'dir7/dir9' to workspace manifest
195 mtn: adding 'dir7/dir9/b' to workspace manifest
196 mtn: adding 'dir7/dir9/dir8' to workspace manifest
197 mtn: adding 'dir7/dir9/dir8/a' to workspace manifest
198 198 $ mtn ci -m divergentdirmove
199 199 mtn: beginning commit on branch 'com.selenic.test'
200 200 mtn: committed revision 08a08511f18b428d840199b062de90d0396bc2ed
201 201 $ mtn mv dir7 dir7-2
202 mtn: renaming dir7 to dir7-2 in workspace manifest
202 mtn: renaming 'dir7' to 'dir7-2' in workspace manifest
203 203 $ mtn mv dir7-2/dir9 dir9-2
204 mtn: renaming dir7-2/dir9 to dir9-2 in workspace manifest
204 mtn: renaming 'dir7-2/dir9' to 'dir9-2' in workspace manifest
205 205 $ mtn mv dir9-2/dir8 dir8-2
206 mtn: renaming dir9-2/dir8 to dir8-2 in workspace manifest
206 mtn: renaming 'dir9-2/dir8' to 'dir8-2' in workspace manifest
207 207 $ mtn ci -m divergentdirmove2
208 208 mtn: beginning commit on branch 'com.selenic.test'
209 209 mtn: committed revision 4a736634505795f17786fffdf2c9cbf5b11df6f6
210 210
211 211 test large file support (> 32kB)
212 212
213 213 $ python -c 'for x in range(10000): print x' > large-file
214 214 $ $TESTDIR/md5sum.py large-file
215 215 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file
216 216 $ mtn add large-file
217 mtn: adding large-file to workspace manifest
217 mtn: adding 'large-file' to workspace manifest
218 218 $ mtn ci -m largefile
219 219 mtn: beginning commit on branch 'com.selenic.test'
220 220 mtn: committed revision f0a20fecd10dc4392d18fe69a03f1f4919d3387b
221 221
222 222 test suspending (closing a branch)
223 223
224 224 $ mtn suspend f0a20fecd10dc4392d18fe69a03f1f4919d3387b 2> /dev/null
225 225 $ cd ..
226 226
227 227 convert incrementally
228 228
229 229 $ hg convert -s mtn repo.mtn
230 230 assuming destination repo.mtn-hg
231 231 scanning source...
232 232 sorting...
233 233 converting...
234 234 12 update2 "with" quotes
235 235 11 createdir1
236 236 10 movedir1
237 237 9 movedir
238 238 8 emptydir
239 239 7 dropdirectory
240 240 6 dirfilemove
241 241 5 dirfilemove2
242 242 4 dirdirmove
243 243 3 dirdirmove2
244 244 2 divergentdirmove
245 245 1 divergentdirmove2
246 246 0 largefile
247 247 $ glog()
248 248 > {
249 249 > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
250 250 > }
251 251 $ cd repo.mtn-hg
252 252 $ hg up -C
253 253 12 files updated, 0 files merged, 0 files removed, 0 files unresolved
254 254 $ glog
255 255 @ 14 "largefile" files: large-file
256 256 |
257 257 o 13 "divergentdirmove2" files: dir7-2/c dir7/c dir7/dir9/b dir7/dir9/dir8/a dir8-2/a dir9-2/b
258 258 |
259 259 o 12 "divergentdirmove" files: dir7/c dir7/dir9/b dir7/dir9/dir8/a
260 260 |
261 261 o 11 "dirdirmove2" files: dir4/a dir6/dir4/a
262 262 |
263 263 o 10 "dirdirmove" files: dir4/a
264 264 |
265 265 o 9 "dirfilemove2" files: dir3/a dir3/d2/a
266 266 |
267 267 o 8 "dirfilemove" files: dir3/a
268 268 |
269 269 o 7 "dropdirectory" files: dir2/dir/subdir/f
270 270 |
271 271 o 6 "emptydir" files: dir2/dir/subdir/f
272 272 |
273 273 o 5 "movedir" files: dir/a dir/d dir2/a dir2/newfile
274 274 |
275 275 o 4 "movedir1" files: dir1/subdir1/file1 dir1/subdir2/file1
276 276 |
277 277 o 3 "createdir1" files: dir1/subdir1/file1 dir1/subdir2_other/file1
278 278 |
279 279 o 2 "update2 "with" quotes" files: bin bin2 dir/b e
280 280 |
281 281 o 1 "update1" files: a bin c dir/a dir/b
282 282 |
283 283 o 0 "initialize" files: a bin c dir/b dir/d
284 284
285 285
286 286 manifest
287 287
288 288 $ hg manifest
289 289 bin2
290 290 dir1/subdir2/file1
291 291 dir1/subdir2_other/file1
292 292 dir2/a
293 293 dir2/newfile
294 294 dir3/d2/a
295 295 dir6/dir4/a
296 296 dir7-2/c
297 297 dir8-2/a
298 298 dir9-2/b
299 299 e
300 300 large-file
301 301
302 302 contents
303 303
304 304 $ cat dir2/a
305 305 a
306 306 a
307 307 $ test -d dir2/dir && echo 'removed dir2/dir is still there!'
308 308 [1]
309 309
310 310 file move
311 311
312 312 $ hg log -v -C -r 1 | grep copies
313 313 copies: dir/a (a)
314 314
315 315 check directory move
316 316
317 317 $ hg manifest -r 4
318 318 bin2
319 319 dir/a
320 320 dir/d
321 321 dir1/subdir2/file1
322 322 dir1/subdir2_other/file1
323 323 e
324 324 $ test -d dir1/subdir2 || echo 'new dir1/subdir2 does not exist!'
325 325 $ test -d dir1/subdir1 && echo 'renamed dir1/subdir1 is still there!'
326 326 [1]
327 327 $ hg log -v -C -r 4 | grep copies
328 328 copies: dir1/subdir2/file1 (dir1/subdir1/file1)
329 329
330 330 check file remove with directory move
331 331
332 332 $ hg manifest -r 5
333 333 bin2
334 334 dir1/subdir2/file1
335 335 dir1/subdir2_other/file1
336 336 dir2/a
337 337 dir2/newfile
338 338 e
339 339
340 340 check file move with directory move
341 341
342 342 $ hg manifest -r 9
343 343 bin2
344 344 dir1/subdir2/file1
345 345 dir1/subdir2_other/file1
346 346 dir2/a
347 347 dir2/newfile
348 348 dir3/d2/a
349 349 e
350 350
351 351 check file directory directory move
352 352
353 353 $ hg manifest -r 11
354 354 bin2
355 355 dir1/subdir2/file1
356 356 dir1/subdir2_other/file1
357 357 dir2/a
358 358 dir2/newfile
359 359 dir3/d2/a
360 360 dir6/dir4/a
361 361 e
362 362
363 363 check divergent directory moves
364 364
365 365 $ hg manifest -r 13
366 366 bin2
367 367 dir1/subdir2/file1
368 368 dir1/subdir2_other/file1
369 369 dir2/a
370 370 dir2/newfile
371 371 dir3/d2/a
372 372 dir6/dir4/a
373 373 dir7-2/c
374 374 dir8-2/a
375 375 dir9-2/b
376 376 e
377 377
378 378 test large file support (> 32kB)
379 379
380 380 $ $TESTDIR/md5sum.py large-file
381 381 5d6de8a95c3b6bf9e0ffb808ba5299c1 large-file
382 382
383 383 check branch closing
384 384
385 385 $ hg branches -a
386 386 $ hg branches -c
387 387 com.selenic.test 14:* (closed) (glob)
388 388
General Comments 0
You need to be logged in to leave comments. Login now