D12411: filemerge: use new function for getting first line of string
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Fri Mar 25 05:38:39 UTC 2022
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.
REPOSITORY
rHG Mercurial
BRANCH
default
REVISION DETAIL
https://phab.mercurial-scm.org/D12411
AFFECTED FILES
mercurial/filemerge.py
CHANGE DETAILS
diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py
--- a/mercurial/filemerge.py
+++ b/mercurial/filemerge.py
@@ -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):
To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
More information about the Mercurial-devel
mailing list