mercurial/simplemerge.py
changeset 37084 f0b6fbea00cf
parent 35368 93c4958d987c
child 38783 e7aa113b14f7
equal deleted inserted replaced
37083:f99d64e8a4e4 37084:f0b6fbea00cf
    21 from .i18n import _
    21 from .i18n import _
    22 from . import (
    22 from . import (
    23     error,
    23     error,
    24     mdiff,
    24     mdiff,
    25     pycompat,
    25     pycompat,
    26     util,
    26 )
       
    27 from .utils import (
       
    28     stringutil,
    27 )
    29 )
    28 
    30 
    29 class CantReprocessAndShowBase(Exception):
    31 class CantReprocessAndShowBase(Exception):
    30     pass
    32     pass
    31 
    33 
   395         return unc
   397         return unc
   396 
   398 
   397 def _verifytext(text, path, ui, opts):
   399 def _verifytext(text, path, ui, opts):
   398     """verifies that text is non-binary (unless opts[text] is passed,
   400     """verifies that text is non-binary (unless opts[text] is passed,
   399     then we just warn)"""
   401     then we just warn)"""
   400     if util.binary(text):
   402     if stringutil.binary(text):
   401         msg = _("%s looks like a binary file.") % path
   403         msg = _("%s looks like a binary file.") % path
   402         if not opts.get('quiet'):
   404         if not opts.get('quiet'):
   403             ui.warn(_('warning: %s\n') % msg)
   405             ui.warn(_('warning: %s\n') % msg)
   404         if not opts.get('text'):
   406         if not opts.get('text'):
   405             raise error.Abort(msg)
   407             raise error.Abort(msg)