changeset 49028:db93041e5b1c

filemerge: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12411
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 24 Mar 2022 22:05:36 -0700
parents 0f0e3830c099
children eb8aed493a56
files mercurial/filemerge.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/filemerge.py	Thu Mar 24 22:05:27 2022 -0700
+++ b/mercurial/filemerge.py	Thu Mar 24 22:05:36 2022 -0700
@@ -848,7 +848,7 @@
 
     props = {b'ctx': ctx}
     templateresult = template.renderdefault(props)
-    input.label_detail = templateresult.splitlines()[0]  # split for safety
+    input.label_detail = stringutil.firstline(templateresult)  # avoid '\n'
 
 
 def _populate_label_details(repo, inputs, tool=None):