Patchwork D12410: absorb: use new function for getting first line of string

login
register
mail settings
Submitter phabricator
Date March 25, 2022, 5:38 a.m.
Message ID <differential-rev-PHID-DREV-foinha56tjieuky7xxyx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50754/
State New
Headers show

Comments

phabricator - March 25, 2022, 5:38 a.m.
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

Patch

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',