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 | |
|
4 | hg init t1 | |
|
5 | hg init t2 | |
|
6 | cd t1 | |
|
7 | echo blablablablabla > file.txt | |
|
8 | hg ci -Ama | |
|
9 | hg log | grep summary | |
|
10 | hg bundle ../b1 ../t2 | |
|
15 | $ cd ../t2 | |
|
16 | $ hg pull ../b1 | |
|
17 | pulling from ../b1 | |
|
18 | requesting all changes | |
|
19 | adding changesets | |
|
20 | adding manifests | |
|
21 | adding file changes | |
|
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 | |
|
13 | hg pull ../b1 | |
|
14 | hg up | |
|
15 | hg log | grep summary | |
|
16 | cd .. | |
|
30 | test bundle types | |
|
17 | 31 | |
|
18 | for t in "None" "bzip2" "gzip"; do | |
|
19 | echo % test bundle type $t | |
|
20 | hg init t$t | |
|
21 | cd t1 | |
|
22 | hg bundle -t $t ../b$t ../t$t | |
|
23 | cut -b 1-6 ../b$t | head -n 1 | |
|
24 | cd ../t$t | |
|
25 | hg pull ../b$t | |
|
26 | hg up | |
|
27 | hg log | grep summary | |
|
28 | cd .. | |
|
29 | done | |
|
32 | $ for t in "None" "bzip2" "gzip"; do | |
|
33 | > echo % test bundle type $t | |
|
34 | > hg init t$t | |
|
35 | > cd t1 | |
|
36 | > hg bundle -t $t ../b$t ../t$t | |
|
37 | > cut -b 1-6 ../b$t | head -n 1 | |
|
38 | > cd ../t$t | |
|
39 | > hg pull ../b$t | |
|
40 | > hg up | |
|
41 | > hg log | grep summary | |
|
42 | > cd .. | |
|
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 |
|
|
|
32 | echo garbage > bgarbage | |
|
33 | hg init tgarbage | |
|
34 | cd tgarbage | |
|
35 | hg pull ../bgarbage | |
|
36 | cd .. | |
|
84 | test garbage file | |
|
37 | 85 | |
|
38 | echo % test invalid bundle type | |
|
39 | cd t1 | |
|
40 | hg bundle -a -t garbage ../bgarbage | |
|
41 | cd .. | |
|
86 | $ echo garbage > bgarbage | |
|
87 | $ hg init tgarbage | |
|
88 | $ cd tgarbage | |
|
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 |
General Comments 0
You need to be logged in to leave comments.
Login now