comparison mercurial/match.py @ 20401:906358d0350e

match: use ctx.getfileset() instead of fileset.getfileset() Resolves an import cycle involving match and merge.
author Augie Fackler <raf@durin42.com>
date Tue, 04 Feb 2014 14:54:42 -0500
parents f962870712da
children b02ab6486a78
comparison
equal deleted inserted replaced
20400:f0137d994c83 20401:906358d0350e
4 # 4 #
5 # This software may be used and distributed according to the terms of the 5 # This software may be used and distributed according to the terms of the
6 # GNU General Public License version 2 or any later version. 6 # GNU General Public License version 2 or any later version.
7 7
8 import re 8 import re
9 import util, fileset, pathutil 9 import util, pathutil
10 from i18n import _ 10 from i18n import _
11 11
12 def _rematcher(pat): 12 def _rematcher(pat):
13 m = util.compilere(pat) 13 m = util.compilere(pat)
14 try: 14 try:
24 24
25 for kind, expr in pats: 25 for kind, expr in pats:
26 if kind == 'set': 26 if kind == 'set':
27 if not ctx: 27 if not ctx:
28 raise util.Abort("fileset expression with no context") 28 raise util.Abort("fileset expression with no context")
29 s = fileset.getfileset(ctx, expr) 29 s = ctx.getfileset(expr)
30 fset.update(s) 30 fset.update(s)
31 continue 31 continue
32 other.append((kind, expr)) 32 other.append((kind, expr))
33 return fset, other 33 return fset, other
34 34