diff mercurial/cmdutil.py @ 36048:46a54de96a54

merge: cut import cycle at merge -> extensions This seems less bad because checking fsmonitor looks like a temporary hack, and cmdutil -> mergemod should be a valid dependency.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 06 Feb 2018 22:55:02 +0900
parents 55e8efa2451a
children f52a9336ac5f
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Tue Feb 06 22:36:38 2018 +0900
+++ b/mercurial/cmdutil.py	Tue Feb 06 22:55:02 2018 +0900
@@ -31,6 +31,7 @@
     formatter,
     logcmdutil,
     match as matchmod,
+    merge as mergemod,
     obsolete,
     patch,
     pathutil,
@@ -220,7 +221,6 @@
 
 def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
             filterfn, *pats, **opts):
-    from . import merge as mergemod
     opts = pycompat.byteskwargs(opts)
     if not ui.interactive():
         if cmdsuggest:
@@ -557,8 +557,6 @@
     return '\n'.join(commentedlines) + '\n'
 
 def _conflictsmsg(repo):
-    # avoid merge cycle
-    from . import merge as mergemod
     mergestate = mergemod.mergestate.read(repo)
     if not mergestate.active():
         return