changeset 16182:bd12ef347680

match: consider filesets as "anypats" Matt suggested this on IRC, I do not think the choice is obvious, but this one makes things simpler because while filesets are turned into a list of files into the match objects, it would more be difficult to tell invalid files passed in pats from those expanded from filesets.
author Patrick Mezard <patrick@mezard.eu>
date Sun, 26 Feb 2012 17:10:55 +0100
parents 1fd352aa08fc
children 112a70c56d6a
files mercurial/match.py tests/test-glog.t
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Sun Feb 26 17:10:51 2012 +0100
+++ b/mercurial/match.py	Sun Feb 26 17:10:55 2012 +0100
@@ -333,5 +333,5 @@
 
 def _anypats(patterns):
     for kind, name in patterns:
-        if kind in ('glob', 're', 'relglob', 'relre'):
+        if kind in ('glob', 're', 'relglob', 'relre', 'set'):
             return True
--- a/tests/test-glog.t	Sun Feb 26 17:10:51 2012 +0100
+++ b/tests/test-glog.t	Sun Feb 26 17:10:55 2012 +0100
@@ -1663,6 +1663,8 @@
 Test "set:..." and parent revision
 
   $ hg up -q 4
+  $ testlog "set:copied()"
+  ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('string', 'r:'), ('string', 'p:set:copied()')))))
   $ testlog --include "set:copied()"
   ('group', ('group', ('func', ('symbol', '_matchfiles'), ('list', ('string', 'r:'), ('string', 'i:set:copied()')))))
   $ testlog -r "sort(file('set:copied()'), -rev)"