changeset 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 f0137d994c83
children a8c0f7b80e00
files mercurial/match.py tests/test-module-imports.t
diffstat 2 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/match.py	Tue Feb 04 15:27:49 2014 -0500
+++ b/mercurial/match.py	Tue Feb 04 14:54:42 2014 -0500
@@ -6,7 +6,7 @@
 # GNU General Public License version 2 or any later version.
 
 import re
-import util, fileset, pathutil
+import util, pathutil
 from i18n import _
 
 def _rematcher(pat):
@@ -26,7 +26,7 @@
         if kind == 'set':
             if not ctx:
                 raise util.Abort("fileset expression with no context")
-            s = fileset.getfileset(ctx, expr)
+            s = ctx.getfileset(expr)
             fset.update(s)
             continue
         other.append((kind, expr))
--- a/tests/test-module-imports.t	Tue Feb 04 15:27:49 2014 -0500
+++ b/tests/test-module-imports.t	Tue Feb 04 14:54:42 2014 -0500
@@ -39,6 +39,4 @@
      stdlib:    formatter
      relative:  config, error, scmutil, util
   Import cycle: mercurial.repoview -> mercurial.revset -> mercurial.repoview
-  Import cycle: mercurial.fileset -> mercurial.merge -> mercurial.subrepo -> mercurial.match -> mercurial.fileset
   Import cycle: mercurial.cmdutil -> mercurial.context -> mercurial.subrepo -> mercurial.cmdutil -> mercurial.cmdutil
-  Import cycle: mercurial.filemerge -> mercurial.match -> mercurial.fileset -> mercurial.merge -> mercurial.filemerge