changeset 45773:84ce9ffc95ad

split: use default one-line summary Differential Revision: https://phab.mercurial-scm.org/D9255
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 27 Oct 2020 10:06:17 -0700
parents 294aab57a5f3
children 450e17e59603
files hgext/split.py tests/test-split.t
diffstat 2 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/split.py	Tue Oct 27 10:22:36 2020 -0700
+++ b/hgext/split.py	Tue Oct 27 10:06:17 2020 -0700
@@ -143,8 +143,8 @@
                 b'HG: Splitting %s. So far it has been split into:\n'
             ) % short(ctx.node())
             for c in committed:
-                firstline = c.description().split(b'\n', 1)[0]
-                header += _(b'HG: - %s: %s\n') % (short(c.node()), firstline)
+                summary = cmdutil.format_changeset_summary(ui, c, b'split')
+                header += _(b'HG: - %s\n') % summary
             header += _(
                 b'HG: Write commit message for the next split changeset.\n'
             )
--- a/tests/test-split.t	Tue Oct 27 10:22:36 2020 -0700
+++ b/tests/test-split.t	Tue Oct 27 10:06:17 2020 -0700
@@ -216,7 +216,7 @@
   (enter ? for help) [Ynesfdaq?] y
   
   EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
-  EDITOR: HG: - e704349bd21b: split 1
+  EDITOR: HG: - 2:e704349bd21b tip "split 1"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: a2
   EDITOR: 
@@ -239,8 +239,8 @@
   (enter ? for help) [Ynesfdaq?] y
   
   EDITOR: HG: Splitting 1df0d5c5a3ab. So far it has been split into:
-  EDITOR: HG: - e704349bd21b: split 1
-  EDITOR: HG: - a09ad58faae3: split 2
+  EDITOR: HG: - 2:e704349bd21b tip "split 1"
+  EDITOR: HG: - 3:a09ad58faae3 "split 2"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: a2
   EDITOR: 
@@ -661,7 +661,7 @@
   (enter ? for help) [Ynesfdaq?] f
   
   EDITOR: HG: Splitting dd3c45017cbf. So far it has been split into:
-  EDITOR: HG: - f205aea1c624: split 1
+  EDITOR: HG: - 2:f205aea1c624 tip "split 1"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: splitme
   EDITOR: 
@@ -718,7 +718,7 @@
   (enter ? for help) [Ynesfdaq?] f
   
   EDITOR: HG: Splitting 904c80b40a4a. So far it has been split into:
-  EDITOR: HG: - ffecf40fa954: split 1
+  EDITOR: HG: - 2:ffecf40fa954 tip "split 1"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: splitme
   EDITOR: 
@@ -843,7 +843,7 @@
   (enter ? for help) [Ynesfdaq?] a
   
   EDITOR: HG: Splitting 8c42fa635116. So far it has been split into:
-  EDITOR: HG: - 478be2a70c27: split1, keeping only the numbered lines
+  EDITOR: HG: - 2:478be2a70c27 tip "split1, keeping only the numbered lines"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: move and modify
   EDITOR: 
@@ -941,7 +941,7 @@
   (enter ? for help) [Ynesfdaq?] a
   
   EDITOR: HG: Splitting 41c861dfa61e. So far it has been split into:
-  EDITOR: HG: - 4b19e06610eb: split1, keeping "file" and only the numbered lines in file2
+  EDITOR: HG: - 2:4b19e06610eb tip "split1, keeping "file" and only the numbered lines in file2"
   EDITOR: HG: Write commit message for the next split changeset.
   EDITOR: copy file->file2, modify both
   EDITOR: