Patchwork [1,of,3] fileset: move import of match module to top

login
register
mail settings
Submitter Yuya Nishihara
Date Jan. 18, 2018, 12:08 p.m.
Message ID <1c00ef820a03c011a06c.1516277316@mimosa>
Download mbox | patch
Permalink /patch/26861/
State Accepted
Headers show

Comments

Yuya Nishihara - Jan. 18, 2018, 12:08 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1515904100 -32400
#      Sun Jan 14 13:28:20 2018 +0900
# Node ID 1c00ef820a03c011a06c9172925cdf597cf38ee6
# Parent  927c55b5ae4ebb16b01da9a2ac60539ecc6bb234
fileset: move import of match module to top

Actually there was no circular import issue.

Patch

diff --git a/mercurial/fileset.py b/mercurial/fileset.py
--- a/mercurial/fileset.py
+++ b/mercurial/fileset.py
@@ -12,6 +12,7 @@  import re
 from .i18n import _
 from . import (
     error,
+    match as matchmod,
     merge,
     parser,
     pycompat,
@@ -508,8 +509,6 @@  def subrepo(mctx, x):
     if x:
         # i18n: "subrepo" is a keyword
         pat = getstring(x, _("subrepo requires a pattern or no arguments"))
-
-        from . import match as matchmod # avoid circular import issues
         fast = not matchmod.patkind(pat)
         if fast:
             def m(s):