Show More
@@ -901,7 +901,7 b' def archive(web, req, tmpl):' | |||||
901 |
|
901 | |||
902 | ctx = webutil.changectx(web.repo, req) |
|
902 | ctx = webutil.changectx(web.repo, req) | |
903 | pats = [] |
|
903 | pats = [] | |
904 | matchfn = None |
|
904 | matchfn = scmutil.match(ctx, []) | |
905 | file = req.form.get('file', None) |
|
905 | file = req.form.get('file', None) | |
906 | if file: |
|
906 | if file: | |
907 | pats = ['path:' + file[0]] |
|
907 | pats = ['path:' + file[0]] |
@@ -20,6 +20,7 b'' | |||||
20 | $ hg ci -m "add subrepo" |
|
20 | $ hg ci -m "add subrepo" | |
21 | $ echo "[web]" >> .hg/hgrc |
|
21 | $ echo "[web]" >> .hg/hgrc | |
22 | $ echo "name = test-archive" >> .hg/hgrc |
|
22 | $ echo "name = test-archive" >> .hg/hgrc | |
|
23 | $ echo "archivesubrepos = True" >> .hg/hgrc | |||
23 | $ cp .hg/hgrc .hg/hgrc-base |
|
24 | $ cp .hg/hgrc .hg/hgrc-base | |
24 | > test_archtype() { |
|
25 | > test_archtype() { | |
25 | > echo "allow_archive = $1" >> .hg/hgrc |
|
26 | > echo "allow_archive = $1" >> .hg/hgrc | |
@@ -95,6 +96,7 b' invalid arch type should give 404' | |||||
95 | test-archive-1701ef1f1510/bar |
|
96 | test-archive-1701ef1f1510/bar | |
96 | test-archive-1701ef1f1510/baz/bletch |
|
97 | test-archive-1701ef1f1510/baz/bletch | |
97 | test-archive-1701ef1f1510/foo |
|
98 | test-archive-1701ef1f1510/foo | |
|
99 | test-archive-1701ef1f1510/subrepo/sub | |||
98 | $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null |
|
100 | $ python getarchive.py "$TIP" bz2 | bunzip2 | tar tf - 2>/dev/null | |
99 | test-archive-1701ef1f1510/.hg_archival.txt |
|
101 | test-archive-1701ef1f1510/.hg_archival.txt | |
100 | test-archive-1701ef1f1510/.hgsub |
|
102 | test-archive-1701ef1f1510/.hgsub | |
@@ -102,6 +104,7 b' invalid arch type should give 404' | |||||
102 | test-archive-1701ef1f1510/bar |
|
104 | test-archive-1701ef1f1510/bar | |
103 | test-archive-1701ef1f1510/baz/bletch |
|
105 | test-archive-1701ef1f1510/baz/bletch | |
104 | test-archive-1701ef1f1510/foo |
|
106 | test-archive-1701ef1f1510/foo | |
|
107 | test-archive-1701ef1f1510/subrepo/sub | |||
105 | $ python getarchive.py "$TIP" zip > archive.zip |
|
108 | $ python getarchive.py "$TIP" zip > archive.zip | |
106 | $ unzip -t archive.zip |
|
109 | $ unzip -t archive.zip | |
107 | Archive: archive.zip |
|
110 | Archive: archive.zip | |
@@ -111,6 +114,7 b' invalid arch type should give 404' | |||||
111 | testing: test-archive-1701ef1f1510/bar OK |
|
114 | testing: test-archive-1701ef1f1510/bar OK | |
112 | testing: test-archive-1701ef1f1510/baz/bletch OK |
|
115 | testing: test-archive-1701ef1f1510/baz/bletch OK | |
113 | testing: test-archive-1701ef1f1510/foo OK |
|
116 | testing: test-archive-1701ef1f1510/foo OK | |
|
117 | testing: test-archive-1701ef1f1510/subrepo/sub OK | |||
114 | No errors detected in compressed data of archive.zip. |
|
118 | No errors detected in compressed data of archive.zip. | |
115 |
|
119 | |||
116 | test that we can download single directories and files |
|
120 | test that we can download single directories and files |
General Comments 0
You need to be logged in to leave comments.
Login now