Mercurial > hg
comparison tests/test-hgignore.t @ 27672:f2da9bb87ae0
debugignore: find out why a file is being ignored (issue4856)
This patch adds a capability to hg debugignore: to explain why a given file is
being ignores by mercurial. We display the filename, line and linenumber of the
rule that lead us to ignore the file.
author | Laurent Charignon <lcharignon@fb.com> |
---|---|
date | Tue, 05 Jan 2016 07:47:08 -0800 |
parents | 067d87feeb11 |
children | 6ff556ef5a46 |
comparison
equal
deleted
inserted
replaced
27671:067d87feeb11 | 27672:f2da9bb87ae0 |
---|---|
166 $ hg debugignore | 166 $ hg debugignore |
167 (?:(?:|.*/)[^/]*(?:/|$)) | 167 (?:(?:|.*/)[^/]*(?:/|$)) |
168 | 168 |
169 $ hg debugignore b.o | 169 $ hg debugignore b.o |
170 b.o is ignored | 170 b.o is ignored |
171 (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 1: '*') | |
171 | 172 |
172 $ cd .. | 173 $ cd .. |
173 | 174 |
174 Check patterns that match only the directory | 175 Check patterns that match only the directory |
175 | 176 |
196 ? syntax | 197 ? syntax |
197 $ hg debugignore a.c | 198 $ hg debugignore a.c |
198 a.c is not ignored | 199 a.c is not ignored |
199 $ hg debugignore dir/c.o | 200 $ hg debugignore dir/c.o |
200 dir/c.o is ignored | 201 dir/c.o is ignored |
202 (ignore rule in $TESTTMP/ignorerepo/.hgignore, line 2: 'dir/**/c.o') | |
201 | 203 |
202 Check using 'include:' in ignore file | 204 Check using 'include:' in ignore file |
203 | 205 |
204 $ hg purge --all --config extensions.purge= | 206 $ hg purge --all --config extensions.purge= |
205 $ touch foo.included | 207 $ touch foo.included |
281 | 283 |
282 $ hg status | grep file2 | 284 $ hg status | grep file2 |
283 [1] | 285 [1] |
284 $ hg debugignore dir1/file2 | 286 $ hg debugignore dir1/file2 |
285 dir1/file2 is ignored | 287 dir1/file2 is ignored |
288 (ignore rule in dir2/.hgignore, line 1: 'file*2') |