diff tests/test-archive.t @ 18967:88d1b59f6906

archive: raise error.Abort if the file pattern matches no files Note that we could raise this exception even if no pattern were specified, but the revision contained no files. However this should not happen in practice since in that case commands.py/archive would exit earlier with an "no working directory: please specify a revision" error message instead.
author Angel Ezquerra <angel.ezquerra@gmail.com>
date Thu, 21 Mar 2013 22:09:15 +0100
parents bb38f4f78104
children 7d2a7f8e9da4
line wrap: on
line diff
--- a/tests/test-archive.t	Sat Feb 09 14:22:52 2013 -0500
+++ b/tests/test-archive.t	Thu Mar 21 22:09:15 2013 +0100
@@ -289,6 +289,16 @@
   *-----* (glob)
   \s*147\s+2 files (re)
 
+show an error when a provided pattern matches no files
+
+  $ hg archive -I file_that_does_not_exist.foo ../empty.zip
+  abort: no files match the archive pattern
+  [255]
+
+  $ hg archive -X * ../empty.zip
+  abort: no files match the archive pattern
+  [255]
+
   $ cd ..
 
 issue3600: check whether "hg archive" can create archive files which