Mercurial > public > mercurial-scm > hg
comparison mercurial/filemerge.py @ 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 | 9dfbea54b680 |
children | 7af798e497f5 |
comparison
equal
deleted
inserted
replaced
49027:0f0e3830c099 | 49028:db93041e5b1c |
---|---|
846 if ctx.node() is None: | 846 if ctx.node() is None: |
847 ctx = ctx.p1() | 847 ctx = ctx.p1() |
848 | 848 |
849 props = {b'ctx': ctx} | 849 props = {b'ctx': ctx} |
850 templateresult = template.renderdefault(props) | 850 templateresult = template.renderdefault(props) |
851 input.label_detail = templateresult.splitlines()[0] # split for safety | 851 input.label_detail = stringutil.firstline(templateresult) # avoid '\n' |
852 | 852 |
853 | 853 |
854 def _populate_label_details(repo, inputs, tool=None): | 854 def _populate_label_details(repo, inputs, tool=None): |
855 """Populates the label details using the conflict marker template.""" | 855 """Populates the label details using the conflict marker template.""" |
856 ui = repo.ui | 856 ui = repo.ui |