mercurial/filemerge.py
changeset 21864 755bf1bbe0a9
parent 21693 9c35f3a8cac4
child 21865 78e56e70c70a
equal deleted inserted replaced
21863:f9c91c638378 21864:755bf1bbe0a9
   285     templateresult = template('conflictmarker', **props)
   285     templateresult = template('conflictmarker', **props)
   286 
   286 
   287     label = ('%s:' % label).ljust(pad + 1)
   287     label = ('%s:' % label).ljust(pad + 1)
   288     mark = '%s %s' % (label, templater.stringify(templateresult))
   288     mark = '%s %s' % (label, templater.stringify(templateresult))
   289 
   289 
       
   290     if mark:
       
   291         mark = mark.splitlines()[0] # split for safety
       
   292 
   290     # The <<< marks add 8 to the length, and '...' adds three, so max
   293     # The <<< marks add 8 to the length, and '...' adds three, so max
   291     # length of the actual marker is 69.
   294     # length of the actual marker is 69.
   292     maxlength = 80 - 8 - 3
   295     maxlength = 80 - 8 - 3
   293     if len(mark) > maxlength:
   296     if len(mark) > maxlength:
   294         mark = mark[:maxlength] + '...'
   297         mark = mark[:maxlength] + '...'