diff tests/test-hgignore.t @ 27671:067d87feeb11

debugignore: find out if a file is being ignored Before this patch debugignore was just displaying the list of ignore patterns. This patch makes it support a list of filename as argument and tells the user if those given files are ignored or not.
author Laurent Charignon <lcharignon@fb.com>
date Tue, 05 Jan 2016 07:47:08 -0800
parents 988367ac2a2a
children f2da9bb87ae0
line wrap: on
line diff
--- a/tests/test-hgignore.t	Tue Jan 05 07:52:04 2016 -0800
+++ b/tests/test-hgignore.t	Tue Jan 05 07:47:08 2016 -0800
@@ -166,6 +166,9 @@
   $ hg debugignore
   (?:(?:|.*/)[^/]*(?:/|$))
 
+  $ hg debugignore b.o
+  b.o is ignored
+
   $ cd ..
 
 Check patterns that match only the directory
@@ -191,6 +194,10 @@
   ? a.c
   ? a.o
   ? syntax
+  $ hg debugignore a.c
+  a.c is not ignored
+  $ hg debugignore dir/c.o
+  dir/c.o is ignored
 
 Check using 'include:' in ignore file
 
@@ -274,3 +281,5 @@
 
   $ hg status | grep file2
   [1]
+  $ hg debugignore dir1/file2
+  dir1/file2 is ignored