equal
deleted
inserted
replaced
844 r = 1 |
844 r = 1 |
845 repo.ui.debug(b'merge tool returned: %d\n' % r) |
845 repo.ui.debug(b'merge tool returned: %d\n' % r) |
846 return True, r, False |
846 return True, r, False |
847 |
847 |
848 |
848 |
849 def _formatconflictmarker(ctx, template, label, pad): |
849 def _formatlabel(ctx, template, label, pad): |
850 """Applies the given template to the ctx, prefixed by the label. |
850 """Applies the given template to the ctx, prefixed by the label. |
851 |
851 |
852 Pad is the minimum width of the label prefix, so that multiple markers |
852 Pad is the minimum width of the label prefix, so that multiple markers |
853 can have aligned templated parts. |
853 can have aligned templated parts. |
854 """ |
854 """ |
891 ) |
891 ) |
892 |
892 |
893 pad = max(len(l) for l in labels) |
893 pad = max(len(l) for l in labels) |
894 |
894 |
895 newlabels = [ |
895 newlabels = [ |
896 _formatconflictmarker(cd, tmpl, labels[0], pad), |
896 _formatlabel(cd, tmpl, labels[0], pad), |
897 _formatconflictmarker(co, tmpl, labels[1], pad), |
897 _formatlabel(co, tmpl, labels[1], pad), |
898 ] |
898 ] |
899 if len(labels) > 2: |
899 if len(labels) > 2: |
900 newlabels.append(_formatconflictmarker(ca, tmpl, labels[2], pad)) |
900 newlabels.append(_formatlabel(ca, tmpl, labels[2], pad)) |
901 return newlabels |
901 return newlabels |
902 |
902 |
903 |
903 |
904 def partextras(labels): |
904 def partextras(labels): |
905 """Return a dictionary of extra labels for use in prompts to the user |
905 """Return a dictionary of extra labels for use in prompts to the user |