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