diff hgext/graphlog.py @ 16171:336e61875335

graphlog: restore FILE glob expansion on Windows On platforms not supporting shell expansion, scmutil.match() performs glob expansion on 'pats' arguments. But _matchfiles() revset calls match.match() directly, bypassing this behaviour. To avoid duplicating scmutil.match(), a secondary scmutil.matchandpats() is introduced returning both the match object and the expanded inputs. Note the expanded pats are also needed in the fast path, and will be used by --follow code path.
author Patrick Mezard <patrick@mezard.eu>
date Sat, 25 Feb 2012 22:11:34 +0100
parents 5a627b49b4d9
children 9178d284b880
line wrap: on
line diff
--- a/hgext/graphlog.py	Sat Feb 25 21:51:13 2012 +0100
+++ b/hgext/graphlog.py	Sat Feb 25 22:11:34 2012 +0100
@@ -268,7 +268,11 @@
     if 'branch' in opts and 'only_branch' in opts:
         opts['branch'] = opts['branch'] + opts.pop('only_branch')
 
-    match = scmutil.match(repo[None], pats, opts)
+    # pats/include/exclude are passed to match.match() directly in
+    # _matchfile() revset but walkchangerevs() builds its matcher with
+    # scmutil.match(). The difference is input pats are globbed on
+    # platforms without shell expansion (windows).
+    match, pats = scmutil.matchandpats(repo[None], pats, opts)
     slowpath = match.anypats() or (match.files() and opts.get('removed'))
     if not slowpath:
         for f in match.files():