mercurial/fileset.py
changeset 38414 235d0bc11e1d
parent 38326 8783f128048e
child 38598 d046bf37f1ba
equal deleted inserted replaced
38413:96871ca32270 38414:235d0bc11e1d
   446     # i18n: "eol" is a keyword
   446     # i18n: "eol" is a keyword
   447     enc = getstring(x, _("eol requires a style name"))
   447     enc = getstring(x, _("eol requires a style name"))
   448 
   448 
   449     s = []
   449     s = []
   450     for f in mctx.existing():
   450     for f in mctx.existing():
   451         d = mctx.ctx[f].data()
   451         fctx = mctx.ctx[f]
   452         if stringutil.binary(d):
   452         if fctx.isbinary():
   453             continue
   453             continue
       
   454         d = fctx.data()
   454         if (enc == 'dos' or enc == 'win') and '\r\n' in d:
   455         if (enc == 'dos' or enc == 'win') and '\r\n' in d:
   455             s.append(f)
   456             s.append(f)
   456         elif enc == 'unix' and re.search('(?<!\r)\n', d):
   457         elif enc == 'unix' and re.search('(?<!\r)\n', d):
   457             s.append(f)
   458             s.append(f)
   458         elif enc == 'mac' and re.search('\r(?!\n)', d):
   459         elif enc == 'mac' and re.search('\r(?!\n)', d):