mercurial/filemerge.py
changeset 21865 78e56e70c70a
parent 21864 755bf1bbe0a9
child 21918 10abc3a5c6b2
equal deleted inserted replaced
21864:755bf1bbe0a9 21865:78e56e70c70a
   288     mark = '%s %s' % (label, templater.stringify(templateresult))
   288     mark = '%s %s' % (label, templater.stringify(templateresult))
   289 
   289 
   290     if mark:
   290     if mark:
   291         mark = mark.splitlines()[0] # split for safety
   291         mark = mark.splitlines()[0] # split for safety
   292 
   292 
   293     # The <<< marks add 8 to the length, and '...' adds three, so max
   293     # 8 for the prefix of conflict marker lines (e.g. '<<<<<<< ')
   294     # length of the actual marker is 69.
   294     return util.ellipsis(mark, 80 - 8)
   295     maxlength = 80 - 8 - 3
       
   296     if len(mark) > maxlength:
       
   297         mark = mark[:maxlength] + '...'
       
   298     return mark
       
   299 
   295 
   300 _defaultconflictmarker = ('{node|short} ' +
   296 _defaultconflictmarker = ('{node|short} ' +
   301     '{ifeq(tags, "tip", "", "{tags} ")}' +
   297     '{ifeq(tags, "tip", "", "{tags} ")}' +
   302     '{if(bookmarks, "{bookmarks} ")}' +
   298     '{if(bookmarks, "{bookmarks} ")}' +
   303     '{ifeq(branch, "default", "", "{branch} ")}' +
   299     '{ifeq(branch, "default", "", "{branch} ")}' +