Mercurial > hg
comparison tests/test-archive.t @ 18968:7d2a7f8e9da4
hgweb: respond HTTP_NOT_FOUND when an archive request does not match any files
author | Angel Ezquerra <angel.ezquerra@gmail.com> |
---|---|
date | Thu, 21 Mar 2013 23:27:37 +0100 |
parents | 88d1b59f6906 |
children | 055d5b3f83b1 |
comparison
equal
deleted
inserted
replaced
18967:88d1b59f6906 | 18968:7d2a7f8e9da4 |
---|---|
106 $ python getarchive.py "$TIP" gz baz | gunzip | tar tf - 2>/dev/null | 106 $ python getarchive.py "$TIP" gz baz | gunzip | tar tf - 2>/dev/null |
107 test-archive-2c0277f05ed4/baz/bletch | 107 test-archive-2c0277f05ed4/baz/bletch |
108 $ python getarchive.py "$TIP" gz foo | gunzip | tar tf - 2>/dev/null | 108 $ python getarchive.py "$TIP" gz foo | gunzip | tar tf - 2>/dev/null |
109 test-archive-2c0277f05ed4/foo | 109 test-archive-2c0277f05ed4/foo |
110 | 110 |
111 test that we detect file patterns that match no files | |
112 | |
113 $ python getarchive.py "$TIP" gz foobar | |
114 HTTP Error 404: file(s) not found: foobar | |
115 | |
111 test that we reject unsafe patterns | 116 test that we reject unsafe patterns |
112 | 117 |
113 $ python getarchive.py "$TIP" gz relre:baz | 118 $ python getarchive.py "$TIP" gz relre:baz |
114 HTTP Error 403: Archive pattern not allowed: relre:baz | 119 HTTP Error 404: file(s) not found: relre:baz |
115 | 120 |
116 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS | 121 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS |
117 | 122 |
118 $ hg archive -t tar test.tar | 123 $ hg archive -t tar test.tar |
119 $ tar tf test.tar | 124 $ tar tf test.tar |