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} ")}' + |