# HG changeset patch # User Martin von Zweigbergk # Date 2022-03-25 05:05:36 # Node ID db93041e5b1ca454167af6adcea4520da21e80e0 # Parent 0f0e3830c099b1293e023bcaa05da838744ee186 filemerge: use new function for getting first line of string Differential Revision: https://phab.mercurial-scm.org/D12411 diff --git a/mercurial/filemerge.py b/mercurial/filemerge.py --- a/mercurial/filemerge.py +++ b/mercurial/filemerge.py @@ -848,7 +848,7 @@ def _populate_label_detail(input, templa 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):