match: use ctx.getfileset() instead of fileset.getfileset()
Resolves an import cycle involving match and merge.
--- 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