hgext/win32text.py
changeset 26420 2fc86d92c4a9
parent 25829 38cf0908bf98
child 26421 4b0fc75f9403
equal deleted inserted replaced
26415:46af0adb5c37 26420:2fc86d92c4a9
    60 
    60 
    61 def checknewline(s, newline, ui=None, repo=None, filename=None):
    61 def checknewline(s, newline, ui=None, repo=None, filename=None):
    62     # warn if already has 'newline' in repository.
    62     # warn if already has 'newline' in repository.
    63     # it might cause unexpected eol conversion.
    63     # it might cause unexpected eol conversion.
    64     # see issue 302:
    64     # see issue 302:
    65     #   http://mercurial.selenic.com/bts/issue302
    65     #   https://bz.mercurial-scm.org/302
    66     if newline in s and ui and filename and repo:
    66     if newline in s and ui and filename and repo:
    67         ui.warn(_('WARNING: %s already has %s line endings\n'
    67         ui.warn(_('WARNING: %s already has %s line endings\n'
    68                   'and does not need EOL conversion by the win32text plugin.\n'
    68                   'and does not need EOL conversion by the win32text plugin.\n'
    69                   'Before your next commit, please reconsider your '
    69                   'Before your next commit, please reconsider your '
    70                   'encode/decode settings in \nMercurial.ini or %s.\n') %
    70                   'encode/decode settings in \nMercurial.ini or %s.\n') %