Show More
@@ -1,242 +1,241 b'' | |||||
1 | # Create server |
|
1 | # Create server | |
2 | $ hg init server |
|
2 | $ hg init server | |
3 | $ cd server |
|
3 | $ cd server | |
4 | $ cat >> .hg/hgrc << EOF |
|
4 | $ cat >> .hg/hgrc << EOF | |
5 | > [extensions] |
|
5 | > [extensions] | |
6 | > extension=$TESTDIR/flagprocessorext.py |
|
6 | > extension=$TESTDIR/flagprocessorext.py | |
7 | > EOF |
|
7 | > EOF | |
8 | $ cd ../ |
|
8 | $ cd ../ | |
9 |
|
9 | |||
10 | # Clone server and enable extensions |
|
10 | # Clone server and enable extensions | |
11 | $ hg clone -q server client |
|
11 | $ hg clone -q server client | |
12 | $ cd client |
|
12 | $ cd client | |
13 | $ cat >> .hg/hgrc << EOF |
|
13 | $ cat >> .hg/hgrc << EOF | |
14 | > [extensions] |
|
14 | > [extensions] | |
15 | > extension=$TESTDIR/flagprocessorext.py |
|
15 | > extension=$TESTDIR/flagprocessorext.py | |
16 | > EOF |
|
16 | > EOF | |
17 |
|
17 | |||
18 | # Commit file that will trigger the noop extension |
|
18 | # Commit file that will trigger the noop extension | |
19 | $ echo '[NOOP]' > noop |
|
19 | $ echo '[NOOP]' > noop | |
20 | $ hg commit -Aqm "noop" |
|
20 | $ hg commit -Aqm "noop" | |
21 |
|
21 | |||
22 | # Commit file that will trigger the base64 extension |
|
22 | # Commit file that will trigger the base64 extension | |
23 | $ echo '[BASE64]' > base64 |
|
23 | $ echo '[BASE64]' > base64 | |
24 | $ hg commit -Aqm 'base64' |
|
24 | $ hg commit -Aqm 'base64' | |
25 |
|
25 | |||
26 | # Commit file that will trigger the gzip extension |
|
26 | # Commit file that will trigger the gzip extension | |
27 | $ echo '[GZIP]' > gzip |
|
27 | $ echo '[GZIP]' > gzip | |
28 | $ hg commit -Aqm 'gzip' |
|
28 | $ hg commit -Aqm 'gzip' | |
29 |
|
29 | |||
30 | # Commit file that will trigger noop and base64 |
|
30 | # Commit file that will trigger noop and base64 | |
31 | $ echo '[NOOP][BASE64]' > noop-base64 |
|
31 | $ echo '[NOOP][BASE64]' > noop-base64 | |
32 | $ hg commit -Aqm 'noop+base64' |
|
32 | $ hg commit -Aqm 'noop+base64' | |
33 |
|
33 | |||
34 | # Commit file that will trigger noop and gzip |
|
34 | # Commit file that will trigger noop and gzip | |
35 | $ echo '[NOOP][GZIP]' > noop-gzip |
|
35 | $ echo '[NOOP][GZIP]' > noop-gzip | |
36 | $ hg commit -Aqm 'noop+gzip' |
|
36 | $ hg commit -Aqm 'noop+gzip' | |
37 |
|
37 | |||
38 | # Commit file that will trigger base64 and gzip |
|
38 | # Commit file that will trigger base64 and gzip | |
39 | $ echo '[BASE64][GZIP]' > base64-gzip |
|
39 | $ echo '[BASE64][GZIP]' > base64-gzip | |
40 | $ hg commit -Aqm 'base64+gzip' |
|
40 | $ hg commit -Aqm 'base64+gzip' | |
41 |
|
41 | |||
42 | # Commit file that will trigger base64, gzip and noop |
|
42 | # Commit file that will trigger base64, gzip and noop | |
43 | $ echo '[BASE64][GZIP][NOOP]' > base64-gzip-noop |
|
43 | $ echo '[BASE64][GZIP][NOOP]' > base64-gzip-noop | |
44 | $ hg commit -Aqm 'base64+gzip+noop' |
|
44 | $ hg commit -Aqm 'base64+gzip+noop' | |
45 |
|
45 | |||
46 | # TEST: ensure the revision data is consistent |
|
46 | # TEST: ensure the revision data is consistent | |
47 | $ hg cat noop |
|
47 | $ hg cat noop | |
48 | [NOOP] |
|
48 | [NOOP] | |
49 | $ hg debugdata noop 0 |
|
49 | $ hg debugdata noop 0 | |
50 | [NOOP] |
|
50 | [NOOP] | |
51 |
|
51 | |||
52 | $ hg cat -r . base64 |
|
52 | $ hg cat -r . base64 | |
53 | [BASE64] |
|
53 | [BASE64] | |
54 | $ hg debugdata base64 0 |
|
54 | $ hg debugdata base64 0 | |
55 | W0JBU0U2NF0K (no-eol) |
|
55 | W0JBU0U2NF0K (no-eol) | |
56 |
|
56 | |||
57 | $ hg cat -r . gzip |
|
57 | $ hg cat -r . gzip | |
58 | [GZIP] |
|
58 | [GZIP] | |
59 | $ hg debugdata gzip 0 |
|
59 | $ hg debugdata gzip 0 | |
60 | x\x9c\x8bv\x8f\xf2\x0c\x88\xe5\x02\x00\x08\xc8\x01\xfd (no-eol) (esc) |
|
60 | x\x9c\x8bv\x8f\xf2\x0c\x88\xe5\x02\x00\x08\xc8\x01\xfd (no-eol) (esc) | |
61 |
|
61 | |||
62 | $ hg cat -r . noop-base64 |
|
62 | $ hg cat -r . noop-base64 | |
63 | [NOOP][BASE64] |
|
63 | [NOOP][BASE64] | |
64 | $ hg debugdata noop-base64 0 |
|
64 | $ hg debugdata noop-base64 0 | |
65 | W05PT1BdW0JBU0U2NF0K (no-eol) |
|
65 | W05PT1BdW0JBU0U2NF0K (no-eol) | |
66 |
|
66 | |||
67 | $ hg cat -r . noop-gzip |
|
67 | $ hg cat -r . noop-gzip | |
68 | [NOOP][GZIP] |
|
68 | [NOOP][GZIP] | |
69 | $ hg debugdata noop-gzip 0 |
|
69 | $ hg debugdata noop-gzip 0 | |
70 | x\x9c\x8b\xf6\xf3\xf7\x0f\x88\x8dv\x8f\xf2\x0c\x88\xe5\x02\x00\x1dH\x03\xf1 (no-eol) (esc) |
|
70 | x\x9c\x8b\xf6\xf3\xf7\x0f\x88\x8dv\x8f\xf2\x0c\x88\xe5\x02\x00\x1dH\x03\xf1 (no-eol) (esc) | |
71 |
|
71 | |||
72 | $ hg cat -r . base64-gzip |
|
72 | $ hg cat -r . base64-gzip | |
73 | [BASE64][GZIP] |
|
73 | [BASE64][GZIP] | |
74 | $ hg debugdata base64-gzip 0 |
|
74 | $ hg debugdata base64-gzip 0 | |
75 | eJyLdnIMdjUziY12j/IMiOUCACLBBDo= (no-eol) |
|
75 | eJyLdnIMdjUziY12j/IMiOUCACLBBDo= (no-eol) | |
76 |
|
76 | |||
77 | $ hg cat -r . base64-gzip-noop |
|
77 | $ hg cat -r . base64-gzip-noop | |
78 | [BASE64][GZIP][NOOP] |
|
78 | [BASE64][GZIP][NOOP] | |
79 | $ hg debugdata base64-gzip-noop 0 |
|
79 | $ hg debugdata base64-gzip-noop 0 | |
80 | eJyLdnIMdjUziY12j/IMiI328/cPiOUCAESjBi4= (no-eol) |
|
80 | eJyLdnIMdjUziY12j/IMiI328/cPiOUCAESjBi4= (no-eol) | |
81 |
|
81 | |||
82 | # Push to the server |
|
82 | # Push to the server | |
83 | $ hg push |
|
83 | $ hg push | |
84 | pushing to $TESTTMP/server (glob) |
|
84 | pushing to $TESTTMP/server (glob) | |
85 | searching for changes |
|
85 | searching for changes | |
86 | adding changesets |
|
86 | adding changesets | |
87 | adding manifests |
|
87 | adding manifests | |
88 | adding file changes |
|
88 | adding file changes | |
89 | added 7 changesets with 7 changes to 7 files |
|
89 | added 7 changesets with 7 changes to 7 files | |
90 |
|
90 | |||
91 | # Initialize new client (not cloning) and setup extension |
|
91 | # Initialize new client (not cloning) and setup extension | |
92 | $ cd .. |
|
92 | $ cd .. | |
93 | $ hg init client2 |
|
93 | $ hg init client2 | |
94 | $ cd client2 |
|
94 | $ cd client2 | |
95 | $ cat >> .hg/hgrc << EOF |
|
95 | $ cat >> .hg/hgrc << EOF | |
96 | > [paths] |
|
96 | > [paths] | |
97 | > default = $TESTTMP/server |
|
97 | > default = $TESTTMP/server | |
98 | > [extensions] |
|
98 | > [extensions] | |
99 | > extension=$TESTDIR/flagprocessorext.py |
|
99 | > extension=$TESTDIR/flagprocessorext.py | |
100 | > EOF |
|
100 | > EOF | |
101 |
|
101 | |||
102 | # Pull from server and update to latest revision |
|
102 | # Pull from server and update to latest revision | |
103 | $ hg pull default |
|
103 | $ hg pull default | |
104 | pulling from $TESTTMP/server (glob) |
|
104 | pulling from $TESTTMP/server (glob) | |
105 | requesting all changes |
|
105 | requesting all changes | |
106 | adding changesets |
|
106 | adding changesets | |
107 | adding manifests |
|
107 | adding manifests | |
108 | adding file changes |
|
108 | adding file changes | |
109 | added 7 changesets with 7 changes to 7 files |
|
109 | added 7 changesets with 7 changes to 7 files | |
110 | (run 'hg update' to get a working copy) |
|
110 | (run 'hg update' to get a working copy) | |
111 | $ hg update |
|
111 | $ hg update | |
112 | 7 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
112 | 7 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
113 |
|
113 | |||
114 | # TEST: ensure the revision data is consistent |
|
114 | # TEST: ensure the revision data is consistent | |
115 | $ hg cat noop |
|
115 | $ hg cat noop | |
116 | [NOOP] |
|
116 | [NOOP] | |
117 | $ hg debugdata noop 0 |
|
117 | $ hg debugdata noop 0 | |
118 | [NOOP] |
|
118 | [NOOP] | |
119 |
|
119 | |||
120 | $ hg cat -r . base64 |
|
120 | $ hg cat -r . base64 | |
121 | [BASE64] |
|
121 | [BASE64] | |
122 | $ hg debugdata base64 0 |
|
122 | $ hg debugdata base64 0 | |
123 | W0JBU0U2NF0K (no-eol) |
|
123 | W0JBU0U2NF0K (no-eol) | |
124 |
|
124 | |||
125 | $ hg cat -r . gzip |
|
125 | $ hg cat -r . gzip | |
126 | [GZIP] |
|
126 | [GZIP] | |
127 | $ hg debugdata gzip 0 |
|
127 | $ hg debugdata gzip 0 | |
128 | x\x9c\x8bv\x8f\xf2\x0c\x88\xe5\x02\x00\x08\xc8\x01\xfd (no-eol) (esc) |
|
128 | x\x9c\x8bv\x8f\xf2\x0c\x88\xe5\x02\x00\x08\xc8\x01\xfd (no-eol) (esc) | |
129 |
|
129 | |||
130 | $ hg cat -r . noop-base64 |
|
130 | $ hg cat -r . noop-base64 | |
131 | [NOOP][BASE64] |
|
131 | [NOOP][BASE64] | |
132 | $ hg debugdata noop-base64 0 |
|
132 | $ hg debugdata noop-base64 0 | |
133 | W05PT1BdW0JBU0U2NF0K (no-eol) |
|
133 | W05PT1BdW0JBU0U2NF0K (no-eol) | |
134 |
|
134 | |||
135 | $ hg cat -r . noop-gzip |
|
135 | $ hg cat -r . noop-gzip | |
136 | [NOOP][GZIP] |
|
136 | [NOOP][GZIP] | |
137 | $ hg debugdata noop-gzip 0 |
|
137 | $ hg debugdata noop-gzip 0 | |
138 | x\x9c\x8b\xf6\xf3\xf7\x0f\x88\x8dv\x8f\xf2\x0c\x88\xe5\x02\x00\x1dH\x03\xf1 (no-eol) (esc) |
|
138 | x\x9c\x8b\xf6\xf3\xf7\x0f\x88\x8dv\x8f\xf2\x0c\x88\xe5\x02\x00\x1dH\x03\xf1 (no-eol) (esc) | |
139 |
|
139 | |||
140 | $ hg cat -r . base64-gzip |
|
140 | $ hg cat -r . base64-gzip | |
141 | [BASE64][GZIP] |
|
141 | [BASE64][GZIP] | |
142 | $ hg debugdata base64-gzip 0 |
|
142 | $ hg debugdata base64-gzip 0 | |
143 | eJyLdnIMdjUziY12j/IMiOUCACLBBDo= (no-eol) |
|
143 | eJyLdnIMdjUziY12j/IMiOUCACLBBDo= (no-eol) | |
144 |
|
144 | |||
145 | $ hg cat -r . base64-gzip-noop |
|
145 | $ hg cat -r . base64-gzip-noop | |
146 | [BASE64][GZIP][NOOP] |
|
146 | [BASE64][GZIP][NOOP] | |
147 | $ hg debugdata base64-gzip-noop 0 |
|
147 | $ hg debugdata base64-gzip-noop 0 | |
148 | eJyLdnIMdjUziY12j/IMiI328/cPiOUCAESjBi4= (no-eol) |
|
148 | eJyLdnIMdjUziY12j/IMiI328/cPiOUCAESjBi4= (no-eol) | |
149 |
|
149 | |||
150 | # TEST: ensure a missing processor is handled |
|
150 | # TEST: ensure a missing processor is handled | |
151 | $ echo '[FAIL][BASE64][GZIP][NOOP]' > fail-base64-gzip-noop |
|
151 | $ echo '[FAIL][BASE64][GZIP][NOOP]' > fail-base64-gzip-noop | |
152 | $ hg commit -Aqm 'fail+base64+gzip+noop' |
|
152 | $ hg commit -Aqm 'fail+base64+gzip+noop' | |
153 | abort: missing processor for flag '0x1'! |
|
153 | abort: missing processor for flag '0x1'! | |
154 | [255] |
|
154 | [255] | |
155 |
|
155 | |||
156 | # TEST: ensure we cannot register several flag processors on the same flag |
|
156 | # TEST: ensure we cannot register several flag processors on the same flag | |
157 | $ cat >> .hg/hgrc << EOF |
|
157 | $ cat >> .hg/hgrc << EOF | |
158 | > [extensions] |
|
158 | > [extensions] | |
159 | > extension=$TESTDIR/flagprocessorext.py |
|
159 | > extension=$TESTDIR/flagprocessorext.py | |
160 | > duplicate=$TESTDIR/flagprocessorext.py |
|
160 | > duplicate=$TESTDIR/flagprocessorext.py | |
161 | > EOF |
|
161 | > EOF | |
162 | $ echo 'this should fail' > file |
|
162 | $ echo 'this should fail' > file | |
163 | $ hg commit -Aqm 'add file' |
|
163 | $ hg commit -Aqm 'add file' | |
164 | abort: cannot register multiple processors on flag '0x8'. |
|
164 | abort: cannot register multiple processors on flag '0x8'. | |
165 | [255] |
|
165 | [255] | |
166 |
|
166 | |||
167 | $ cd .. |
|
167 | $ cd .. | |
168 |
|
168 | |||
169 | # TEST: bundle repo |
|
169 | # TEST: bundle repo | |
170 | $ hg init bundletest |
|
170 | $ hg init bundletest | |
171 | $ cd bundletest |
|
171 | $ cd bundletest | |
172 |
|
172 | |||
173 | $ cat >> .hg/hgrc << EOF |
|
173 | $ cat >> .hg/hgrc << EOF | |
174 | > [extensions] |
|
174 | > [extensions] | |
175 | > flagprocessor=$TESTDIR/flagprocessorext.py |
|
175 | > flagprocessor=$TESTDIR/flagprocessorext.py | |
176 | > EOF |
|
176 | > EOF | |
177 |
|
177 | |||
178 | $ for i in 0 single two three 4; do |
|
178 | $ for i in 0 single two three 4; do | |
179 | > echo '[BASE64]a-bit-longer-'$i > base64 |
|
179 | > echo '[BASE64]a-bit-longer-'$i > base64 | |
180 | > hg commit -m base64-$i -A base64 |
|
180 | > hg commit -m base64-$i -A base64 | |
181 | > done |
|
181 | > done | |
182 |
|
182 | |||
183 | $ hg update 2 -q |
|
183 | $ hg update 2 -q | |
184 | $ echo '[BASE64]a-bit-longer-branching' > base64 |
|
184 | $ echo '[BASE64]a-bit-longer-branching' > base64 | |
185 | $ hg commit -q -m branching |
|
185 | $ hg commit -q -m branching | |
186 |
|
186 | |||
187 | $ hg bundle --base 1 bundle.hg |
|
187 | $ hg bundle --base 1 bundle.hg | |
188 | 4 changesets found |
|
188 | 4 changesets found | |
189 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q |
|
189 | $ hg --config extensions.strip= strip -r 2 --no-backup --force -q | |
190 |
$ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 |
|
190 | $ hg -R bundle.hg log --stat -T '{rev} {desc}\n' base64 | |
191 | 5 branching |
|
191 | 5 branching | |
192 | base64 | 2 +- |
|
192 | base64 | 2 +- | |
193 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
193 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
194 |
|
194 | |||
195 | 4 base64-4 |
|
195 | 4 base64-4 | |
196 | base64 | 2 +- |
|
196 | base64 | 2 +- | |
197 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
197 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
198 |
|
198 | |||
199 | 3 base64-three |
|
199 | 3 base64-three | |
200 | base64 | 2 +- |
|
200 | base64 | 2 +- | |
201 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
201 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
202 |
|
202 | |||
203 | 2 base64-two |
|
203 | 2 base64-two | |
204 | base64 | 2 +- |
|
204 | base64 | 2 +- | |
205 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
205 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
206 |
|
206 | |||
207 | 1 base64-single |
|
207 | 1 base64-single | |
208 | base64 | 2 +- |
|
208 | base64 | 2 +- | |
209 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
209 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
210 |
|
210 | |||
211 | 0 base64-0 |
|
211 | 0 base64-0 | |
212 | base64 | 1 + |
|
212 | base64 | 1 + | |
213 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
213 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
214 |
|
214 | |||
215 |
|
215 | |||
216 |
$ hg bundle -R bundle.hg --base 1 bundle-again.hg -q |
|
216 | $ hg bundle -R bundle.hg --base 1 bundle-again.hg -q | |
217 | [1] |
|
217 | $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 | |
218 | $ hg -R bundle-again.hg log --stat -T '{rev} {desc}\n' base64 2>&1 | egrep -v '^(\*\*| )' |
|
|||
219 | 5 branching |
|
218 | 5 branching | |
220 | base64 | 2 +- |
|
219 | base64 | 2 +- | |
221 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
220 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
222 |
|
221 | |||
223 | 4 base64-4 |
|
222 | 4 base64-4 | |
224 | base64 | 2 +- |
|
223 | base64 | 2 +- | |
225 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
224 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
226 |
|
225 | |||
227 | 3 base64-three |
|
226 | 3 base64-three | |
228 | base64 | 2 +- |
|
227 | base64 | 2 +- | |
229 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
228 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
230 |
|
229 | |||
231 | 2 base64-two |
|
230 | 2 base64-two | |
232 | base64 | 2 +- |
|
231 | base64 | 2 +- | |
233 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
232 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
234 |
|
233 | |||
235 | 1 base64-single |
|
234 | 1 base64-single | |
236 | base64 | 2 +- |
|
235 | base64 | 2 +- | |
237 | 1 files changed, 1 insertions(+), 1 deletions(-) |
|
236 | 1 files changed, 1 insertions(+), 1 deletions(-) | |
238 |
|
237 | |||
239 | 0 base64-0 |
|
238 | 0 base64-0 | |
240 | base64 | 1 + |
|
239 | base64 | 1 + | |
241 | 1 files changed, 1 insertions(+), 0 deletions(-) |
|
240 | 1 files changed, 1 insertions(+), 0 deletions(-) | |
242 |
|
241 |
General Comments 0
You need to be logged in to leave comments.
Login now