link_tree.py: format conflict error message (#29870)

Show each `[src a] and [src b] both project to [dst]` on a separate
line.
This commit is contained in:
Harmen Stoppels 2022-04-06 07:27:02 +02:00 committed by GitHub
parent a717ba9b87
commit 558f7f007e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -426,9 +426,9 @@ def __init__(self, conflicts):
A human-readable summary of file system view merge conflicts (showing only the
first 3 issues.)
"""
msg = "{0} fatal error(s) when merging prefixes:\n".format(len(conflicts))
msg = "{0} fatal error(s) when merging prefixes:".format(len(conflicts))
# show the first 3 merge conflicts.
for conflict in conflicts[:3]:
msg += " `{0}` and `{1}` both project to `{2}`".format(
msg += "\n `{0}` and `{1}` both project to `{2}`".format(
conflict.src_a, conflict.src_b, conflict.dst)
super(MergeConflictSummary, self).__init__(msg)