mercurial/cmdutil.py
changeset 36010 46a54de96a54
parent 36009 55e8efa2451a
child 36137 f52a9336ac5f
equal deleted inserted replaced
36009:55e8efa2451a 36010:46a54de96a54
    29     encoding,
    29     encoding,
    30     error,
    30     error,
    31     formatter,
    31     formatter,
    32     logcmdutil,
    32     logcmdutil,
    33     match as matchmod,
    33     match as matchmod,
       
    34     merge as mergemod,
    34     obsolete,
    35     obsolete,
    35     patch,
    36     patch,
    36     pathutil,
    37     pathutil,
    37     pycompat,
    38     pycompat,
    38     registrar,
    39     registrar,
   218         ui.write = oldwrite
   219         ui.write = oldwrite
   219     return newchunks, newopts
   220     return newchunks, newopts
   220 
   221 
   221 def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
   222 def dorecord(ui, repo, commitfunc, cmdsuggest, backupall,
   222             filterfn, *pats, **opts):
   223             filterfn, *pats, **opts):
   223     from . import merge as mergemod
       
   224     opts = pycompat.byteskwargs(opts)
   224     opts = pycompat.byteskwargs(opts)
   225     if not ui.interactive():
   225     if not ui.interactive():
   226         if cmdsuggest:
   226         if cmdsuggest:
   227             msg = _('running non-interactively, use %s instead') % cmdsuggest
   227             msg = _('running non-interactively, use %s instead') % cmdsuggest
   228         else:
   228         else:
   555     lines = raw.splitlines()
   555     lines = raw.splitlines()
   556     commentedlines = ['# %s' % line for line in lines]
   556     commentedlines = ['# %s' % line for line in lines]
   557     return '\n'.join(commentedlines) + '\n'
   557     return '\n'.join(commentedlines) + '\n'
   558 
   558 
   559 def _conflictsmsg(repo):
   559 def _conflictsmsg(repo):
   560     # avoid merge cycle
       
   561     from . import merge as mergemod
       
   562     mergestate = mergemod.mergestate.read(repo)
   560     mergestate = mergemod.mergestate.read(repo)
   563     if not mergestate.active():
   561     if not mergestate.active():
   564         return
   562         return
   565 
   563 
   566     m = scmutil.match(repo[None])
   564     m = scmutil.match(repo[None])