From patchwork Fri Mar 25 05:38:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D12410: absorb: use new function for getting first line of string From: phabricator X-Patchwork-Id: 50754 Message-Id: To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Fri, 25 Mar 2022 05:38:39 +0000 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/D12410 AFFECTED FILES hgext/absorb.py CHANGE DETAILS To: martinvonz, #hg-reviewers Cc: mercurial-patches, mercurial-devel diff --git a/hgext/absorb.py b/hgext/absorb.py --- a/hgext/absorb.py +++ b/hgext/absorb.py @@ -1062,7 +1062,7 @@ fm.context(ctx=ctx) fm.data(linetype=b'changeset') fm.write(b'node', b'%-7.7s ', ctx.hex(), label=b'absorb.node') - descfirstline = ctx.description().splitlines()[0] + descfirstline = stringutil.firstline(ctx.description()) fm.write( b'descfirstline', b'%s\n',