Show More
@@ -12,6 +12,12 b'' | |||||
12 | $ echo bletch>baz/bletch |
|
12 | $ echo bletch>baz/bletch | |
13 | $ hg commit -Am 3 -d '1000000000 0' |
|
13 | $ hg commit -Am 3 -d '1000000000 0' | |
14 | adding baz/bletch |
|
14 | adding baz/bletch | |
|
15 | $ hg init subrepo | |||
|
16 | $ touch subrepo/sub | |||
|
17 | $ hg -q -R subrepo ci -Am "init subrepo" | |||
|
18 | $ echo "subrepo = subrepo" > .hgsub | |||
|
19 | $ hg add .hgsub | |||
|
20 | $ hg ci -m "add subrepo" | |||
15 | $ echo "[web]" >> .hg/hgrc |
|
21 | $ echo "[web]" >> .hg/hgrc | |
16 | $ echo "name = test-archive" >> .hg/hgrc |
|
22 | $ echo "name = test-archive" >> .hg/hgrc | |
17 | $ cp .hg/hgrc .hg/hgrc-base |
|
23 | $ cp .hg/hgrc .hg/hgrc-base | |
@@ -83,30 +89,36 b' invalid arch type should give 404' | |||||
83 | > sys.stderr.write(str(e) + '\n') |
|
89 | > sys.stderr.write(str(e) + '\n') | |
84 | > EOF |
|
90 | > EOF | |
85 | $ python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null |
|
91 | $ python getarchive.py "$TIP" gz | gunzip | tar tf - 2>/dev/null | |
86 |
test-archive- |
|
92 | test-archive-1701ef1f1510/.hg_archival.txt | |
87 |
test-archive- |
|
93 | test-archive-1701ef1f1510/.hgsub | |
88 | test-archive-2c0277f05ed4/baz/bletch |
|
94 | test-archive-1701ef1f1510/.hgsubstate | |
89 |
test-archive- |
|
95 | test-archive-1701ef1f1510/bar | |
|
96 | test-archive-1701ef1f1510/baz/bletch | |||
|
97 | test-archive-1701ef1f1510/foo | |||
90 | $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null |
|
98 | $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null | |
91 |
test-archive- |
|
99 | test-archive-1701ef1f1510/.hg_archival.txt | |
92 |
test-archive- |
|
100 | test-archive-1701ef1f1510/.hgsub | |
93 | test-archive-2c0277f05ed4/baz/bletch |
|
101 | test-archive-1701ef1f1510/.hgsubstate | |
94 |
test-archive- |
|
102 | test-archive-1701ef1f1510/bar | |
|
103 | test-archive-1701ef1f1510/baz/bletch | |||
|
104 | test-archive-1701ef1f1510/foo | |||
95 | $ python getarchive.py "$TIP" zip > archive.zip |
|
105 | $ python getarchive.py "$TIP" zip > archive.zip | |
96 | $ unzip -t archive.zip |
|
106 | $ unzip -t archive.zip | |
97 | Archive: archive.zip |
|
107 | Archive: archive.zip | |
98 |
testing: test-archive- |
|
108 | testing: test-archive-1701ef1f1510/.hg_archival.txt OK | |
99 |
testing: test-archive- |
|
109 | testing: test-archive-1701ef1f1510/.hgsub OK | |
100 |
testing: test-archive- |
|
110 | testing: test-archive-1701ef1f1510/.hgsubstate OK | |
101 |
testing: test-archive- |
|
111 | testing: test-archive-1701ef1f1510/bar OK | |
|
112 | testing: test-archive-1701ef1f1510/baz/bletch OK | |||
|
113 | testing: test-archive-1701ef1f1510/foo OK | |||
102 | No errors detected in compressed data of archive.zip. |
|
114 | No errors detected in compressed data of archive.zip. | |
103 |
|
115 | |||
104 | test that we can download single directories and files |
|
116 | test that we can download single directories and files | |
105 |
|
117 | |||
106 | $ python getarchive.py "$TIP" gz baz | gunzip | tar tf - 2>/dev/null |
|
118 | $ python getarchive.py "$TIP" gz baz | gunzip | tar tf - 2>/dev/null | |
107 |
test-archive- |
|
119 | test-archive-1701ef1f1510/baz/bletch | |
108 | $ python getarchive.py "$TIP" gz foo | gunzip | tar tf - 2>/dev/null |
|
120 | $ python getarchive.py "$TIP" gz foo | gunzip | tar tf - 2>/dev/null | |
109 |
test-archive- |
|
121 | test-archive-1701ef1f1510/foo | |
110 |
|
122 | |||
111 | test that we detect file patterns that match no files |
|
123 | test that we detect file patterns that match no files | |
112 |
|
124 | |||
@@ -123,29 +135,39 b' test that we reject unsafe patterns' | |||||
123 | $ hg archive -t tar test.tar |
|
135 | $ hg archive -t tar test.tar | |
124 | $ tar tf test.tar |
|
136 | $ tar tf test.tar | |
125 | test/.hg_archival.txt |
|
137 | test/.hg_archival.txt | |
|
138 | test/.hgsub | |||
|
139 | test/.hgsubstate | |||
126 | test/bar |
|
140 | test/bar | |
127 | test/baz/bletch |
|
141 | test/baz/bletch | |
128 | test/foo |
|
142 | test/foo | |
129 |
|
143 | |||
130 | $ hg archive --debug -t tbz2 -X baz test.tar.bz2 |
|
144 | $ hg archive --debug -t tbz2 -X baz test.tar.bz2 | |
131 |
archiving: 0/ |
|
145 | archiving: 0/4 files (0.00%) | |
132 |
archiving: b |
|
146 | archiving: .hgsub 1/4 files (25.00%) | |
133 |
archiving: |
|
147 | archiving: .hgsubstate 2/4 files (50.00%) | |
|
148 | archiving: bar 3/4 files (75.00%) | |||
|
149 | archiving: foo 4/4 files (100.00%) | |||
134 | $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null |
|
150 | $ bunzip2 -dc test.tar.bz2 | tar tf - 2>/dev/null | |
135 | test/.hg_archival.txt |
|
151 | test/.hg_archival.txt | |
|
152 | test/.hgsub | |||
|
153 | test/.hgsubstate | |||
136 | test/bar |
|
154 | test/bar | |
137 | test/foo |
|
155 | test/foo | |
138 |
|
156 | |||
139 | $ hg archive -t tgz -p %b-%h test-%h.tar.gz |
|
157 | $ hg archive -t tgz -p %b-%h test-%h.tar.gz | |
140 | $ gzip -dc test-$QTIP.tar.gz | tar tf - 2>/dev/null |
|
158 | $ gzip -dc test-$QTIP.tar.gz | tar tf - 2>/dev/null | |
141 |
test- |
|
159 | test-1701ef1f1510/.hg_archival.txt | |
142 | test-2c0277f05ed4/bar |
|
160 | test-1701ef1f1510/.hgsub | |
143 | test-2c0277f05ed4/baz/bletch |
|
161 | test-1701ef1f1510/.hgsubstate | |
144 | test-2c0277f05ed4/foo |
|
162 | test-1701ef1f1510/bar | |
|
163 | test-1701ef1f1510/baz/bletch | |||
|
164 | test-1701ef1f1510/foo | |||
145 |
|
165 | |||
146 | $ hg archive autodetected_test.tar |
|
166 | $ hg archive autodetected_test.tar | |
147 | $ tar tf autodetected_test.tar |
|
167 | $ tar tf autodetected_test.tar | |
148 | autodetected_test/.hg_archival.txt |
|
168 | autodetected_test/.hg_archival.txt | |
|
169 | autodetected_test/.hgsub | |||
|
170 | autodetected_test/.hgsubstate | |||
149 | autodetected_test/bar |
|
171 | autodetected_test/bar | |
150 | autodetected_test/baz/bletch |
|
172 | autodetected_test/baz/bletch | |
151 | autodetected_test/foo |
|
173 | autodetected_test/foo | |
@@ -155,6 +177,8 b" The '-t' should override autodetection" | |||||
155 | $ hg archive -t tar autodetect_override_test.zip |
|
177 | $ hg archive -t tar autodetect_override_test.zip | |
156 | $ tar tf autodetect_override_test.zip |
|
178 | $ tar tf autodetect_override_test.zip | |
157 | autodetect_override_test.zip/.hg_archival.txt |
|
179 | autodetect_override_test.zip/.hg_archival.txt | |
|
180 | autodetect_override_test.zip/.hgsub | |||
|
181 | autodetect_override_test.zip/.hgsubstate | |||
158 | autodetect_override_test.zip/bar |
|
182 | autodetect_override_test.zip/bar | |
159 | autodetect_override_test.zip/baz/bletch |
|
183 | autodetect_override_test.zip/baz/bletch | |
160 | autodetect_override_test.zip/foo |
|
184 | autodetect_override_test.zip/foo | |
@@ -203,10 +227,12 b' rename them afterwards.' | |||||
203 | No errors detected in compressed data of test.zip. |
|
227 | No errors detected in compressed data of test.zip. | |
204 |
|
228 | |||
205 | $ hg archive -t tar - | tar tf - 2>/dev/null |
|
229 | $ hg archive -t tar - | tar tf - 2>/dev/null | |
206 |
test- |
|
230 | test-1701ef1f1510/.hg_archival.txt | |
207 | test-2c0277f05ed4/bar |
|
231 | test-1701ef1f1510/.hgsub | |
208 | test-2c0277f05ed4/baz/bletch |
|
232 | test-1701ef1f1510/.hgsubstate | |
209 | test-2c0277f05ed4/foo |
|
233 | test-1701ef1f1510/bar | |
|
234 | test-1701ef1f1510/baz/bletch | |||
|
235 | test-1701ef1f1510/foo | |||
210 |
|
236 | |||
211 | $ hg archive -r 0 -t tar rev-%r.tar |
|
237 | $ hg archive -r 0 -t tar rev-%r.tar | |
212 | $ [ -f rev-0.tar ] |
|
238 | $ [ -f rev-0.tar ] | |
@@ -216,10 +242,10 b' test .hg_archival.txt' | |||||
216 | $ hg archive ../test-tags |
|
242 | $ hg archive ../test-tags | |
217 | $ cat ../test-tags/.hg_archival.txt |
|
243 | $ cat ../test-tags/.hg_archival.txt | |
218 | repo: daa7f7c60e0a224faa4ff77ca41b2760562af264 |
|
244 | repo: daa7f7c60e0a224faa4ff77ca41b2760562af264 | |
219 | node: 2c0277f05ed49d1c8328fb9ba92fba7a5ebcb33e |
|
245 | node: 1701ef1f151069b8747038e93b5186bb43a47504 | |
220 | branch: default |
|
246 | branch: default | |
221 | latesttag: null |
|
247 | latesttag: null | |
222 |
latesttagdistance: |
|
248 | latesttagdistance: 4 | |
223 | $ hg tag -r 2 mytag |
|
249 | $ hg tag -r 2 mytag | |
224 | $ hg tag -r 2 anothertag |
|
250 | $ hg tag -r 2 anothertag | |
225 | $ hg archive -r 2 ../test-lasttag |
|
251 | $ hg archive -r 2 ../test-lasttag | |
@@ -250,16 +276,20 b' enable progress extension:' | |||||
250 |
|
276 | |||
251 | $ hg archive ../with-progress |
|
277 | $ hg archive ../with-progress | |
252 | \r (no-eol) (esc) |
|
278 | \r (no-eol) (esc) | |
253 |
archiving [ ] 0/ |
|
279 | archiving [ ] 0/6\r (no-eol) (esc) | |
254 |
archiving [ ] 0/ |
|
280 | archiving [ ] 0/6\r (no-eol) (esc) | |
255 |
archiving [====== |
|
281 | archiving [======> ] 1/6\r (no-eol) (esc) | |
256 |
archiving [====== |
|
282 | archiving [======> ] 1/6\r (no-eol) (esc) | |
257 |
archiving [============= |
|
283 | archiving [=============> ] 2/6\r (no-eol) (esc) | |
258 |
archiving [============= |
|
284 | archiving [=============> ] 2/6\r (no-eol) (esc) | |
259 |
archiving [==================== |
|
285 | archiving [====================> ] 3/6\r (no-eol) (esc) | |
260 |
archiving [==================== |
|
286 | archiving [====================> ] 3/6\r (no-eol) (esc) | |
261 |
archiving [=========================== |
|
287 | archiving [===========================> ] 4/6\r (no-eol) (esc) | |
262 |
archiving [=========================== |
|
288 | archiving [===========================> ] 4/6\r (no-eol) (esc) | |
|
289 | archiving [==================================> ] 5/6\r (no-eol) (esc) | |||
|
290 | archiving [==================================> ] 5/6\r (no-eol) (esc) | |||
|
291 | archiving [==========================================>] 6/6\r (no-eol) (esc) | |||
|
292 | archiving [==========================================>] 6/6\r (no-eol) (esc) | |||
263 | \r (no-eol) (esc) |
|
293 | \r (no-eol) (esc) | |
264 |
|
294 | |||
265 | cleanup after progress extension test: |
|
295 | cleanup after progress extension test: |
General Comments 0
You need to be logged in to leave comments.
Login now