# HG changeset patch # User Thomas Arendsen Hein # Date 1202223550 -3600 # Node ID 20b05618b3e213c5aaac85ee196e60d856b1b1b3 # Parent 404be894cf716a66ee7dd0648bd7346d66c9e4c1# Parent b70a530bdb93440296be06372e585242b035cb54 merge with crew-stable diff -r 404be894cf71 -r 20b05618b3e2 mercurial/archival.py --- a/mercurial/archival.py Tue Feb 05 14:34:46 2008 +0100 +++ b/mercurial/archival.py Tue Feb 05 15:59:10 2008 +0100 @@ -208,6 +208,8 @@ archiver.addfile(name, mode, islink, data) ctx = repo.changectx(node) + if kind not in archivers: + raise util.Abort(_("unknown archive type '%s'" % kind)) archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0]) m = ctx.manifest() items = m.items() diff -r 404be894cf71 -r 20b05618b3e2 tests/test-archive --- a/tests/test-archive Tue Feb 05 14:34:46 2008 +0100 +++ b/tests/test-archive Tue Feb 05 15:59:10 2008 +0100 @@ -69,6 +69,8 @@ echo 'rev-0.tar created' fi +hg archive -t bogus test.bogus + echo % server errors cat errors.log diff -r 404be894cf71 -r 20b05618b3e2 tests/test-archive.out --- a/tests/test-archive.out Tue Feb 05 14:34:46 2008 +0100 +++ b/tests/test-archive.out Tue Feb 05 15:59:10 2008 +0100 @@ -39,6 +39,7 @@ test-TIP/baz/bletch test-TIP/foo rev-0.tar created +abort: unknown archive type 'bogus' % server errors % empty repo abort: repository has no revisions