##// END OF EJS Templates
cleanly abort on unknown archive type (issue966)
Dirkjan Ochtman -
r6019:b70a530b default
parent child Browse files
Show More
@@ -208,6 +208,8 b' def archive(repo, dest, node, kind, deco'
208 208 archiver.addfile(name, mode, islink, data)
209 209
210 210 ctx = repo.changectx(node)
211 if kind not in archivers:
212 raise util.Abort(_("unknown archive type '%s'" % kind))
211 213 archiver = archivers[kind](dest, prefix, mtime or ctx.date()[0])
212 214 m = ctx.manifest()
213 215 items = m.items()
@@ -69,6 +69,8 b' if [ -f rev-0.tar ]; then'
69 69 echo 'rev-0.tar created'
70 70 fi
71 71
72 hg archive -t bogus test.bogus
73
72 74 echo '% empty repo'
73 75 hg init ../empty
74 76 cd ../empty
@@ -39,5 +39,6 b' test-TIP/bar'
39 39 test-TIP/baz/bletch
40 40 test-TIP/foo
41 41 rev-0.tar created
42 abort: unknown archive type 'bogus'
42 43 % empty repo
43 44 abort: repository has no revisions
General Comments 0
You need to be logged in to leave comments. Login now