##// END OF EJS Templates
tests: unify test-bundle-type
Martin Geisler -
r11872:bc436a97 default
parent child Browse files
Show More
@@ -1,41 +1,99 b''
1 #!/bin/sh
1 bundle w/o type option
2
3 $ hg init t1
4 $ hg init t2
5 $ cd t1
6 $ echo blablablablabla > file.txt
7 $ hg ci -Ama
8 adding file.txt
9 $ hg log | grep summary
10 summary: a
11 $ hg bundle ../b1 ../t2
12 searching for changes
13 1 changesets found
2
14
3 echo % bundle w/o type option
15 $ cd ../t2
4 hg init t1
16 $ hg pull ../b1
5 hg init t2
17 pulling from ../b1
6 cd t1
18 requesting all changes
7 echo blablablablabla > file.txt
19 adding changesets
8 hg ci -Ama
20 adding manifests
9 hg log | grep summary
21 adding file changes
10 hg bundle ../b1 ../t2
22 added 1 changesets with 1 changes to 1 files
23 (run 'hg update' to get a working copy)
24 $ hg up
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
26 $ hg log | grep summary
27 summary: a
28 $ cd ..
11
29
12 cd ../t2
30 test bundle types
13 hg pull ../b1
14 hg up
15 hg log | grep summary
16 cd ..
17
31
18 for t in "None" "bzip2" "gzip"; do
32 $ for t in "None" "bzip2" "gzip"; do
19 echo % test bundle type $t
33 > echo % test bundle type $t
20 hg init t$t
34 > hg init t$t
21 cd t1
35 > cd t1
22 hg bundle -t $t ../b$t ../t$t
36 > hg bundle -t $t ../b$t ../t$t
23 cut -b 1-6 ../b$t | head -n 1
37 > cut -b 1-6 ../b$t | head -n 1
24 cd ../t$t
38 > cd ../t$t
25 hg pull ../b$t
39 > hg pull ../b$t
26 hg up
40 > hg up
27 hg log | grep summary
41 > hg log | grep summary
28 cd ..
42 > cd ..
29 done
43 > done
44 % test bundle type None
45 searching for changes
46 1 changesets found
47 HG10UN
48 pulling from ../bNone
49 requesting all changes
50 adding changesets
51 adding manifests
52 adding file changes
53 added 1 changesets with 1 changes to 1 files
54 (run 'hg update' to get a working copy)
55 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
56 summary: a
57 % test bundle type bzip2
58 searching for changes
59 1 changesets found
60 HG10BZ
61 pulling from ../bbzip2
62 requesting all changes
63 adding changesets
64 adding manifests
65 adding file changes
66 added 1 changesets with 1 changes to 1 files
67 (run 'hg update' to get a working copy)
68 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
69 summary: a
70 % test bundle type gzip
71 searching for changes
72 1 changesets found
73 HG10GZ
74 pulling from ../bgzip
75 requesting all changes
76 adding changesets
77 adding manifests
78 adding file changes
79 added 1 changesets with 1 changes to 1 files
80 (run 'hg update' to get a working copy)
81 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
82 summary: a
30
83
31 echo % test garbage file
84 test garbage file
32 echo garbage > bgarbage
33 hg init tgarbage
34 cd tgarbage
35 hg pull ../bgarbage
36 cd ..
37
85
38 echo % test invalid bundle type
86 $ echo garbage > bgarbage
39 cd t1
87 $ hg init tgarbage
40 hg bundle -a -t garbage ../bgarbage
88 $ cd tgarbage
41 cd ..
89 $ hg pull ../bgarbage
90 abort: ../bgarbage: not a Mercurial bundle file
91 $ cd ..
92
93 test invalid bundle type
94
95 $ cd t1
96 $ hg bundle -a -t garbage ../bgarbage
97 1 changesets found
98 abort: unknown bundle type specified with --type
99 $ cd ..
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