changeset 45170:c87bd1fe3da2

absorb: improve message for the case when changeset became empty In changeset f55099982bc5, I introduced the message "became empty and became ...", which I was never very happy with. Raphaël Gomès suggested "became empty as ...". That sounds much nicer. Differential Revision: https://phab.mercurial-scm.org/D8765
author Manuel Jacob <me@manueljacob.de>
date Fri, 17 Jul 2020 20:24:42 +0200
parents 3496b5f24371
children 5322e738be0f
files hgext/absorb.py tests/test-absorb.t
diffstat 2 files changed, 3 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/absorb.py	Sat Jul 18 22:57:28 2020 +0200
+++ b/hgext/absorb.py	Fri Jul 17 20:24:42 2020 +0200
@@ -798,10 +798,7 @@
                 self.replacemap[ctx.node()] = lastcommitted.node()
                 if memworkingcopy:
                     if willbecomenoop:
-                        msg = _(
-                            b'%d file(s) changed, became empty '
-                            b'and became %s'
-                        )
+                        msg = _(b'%d file(s) changed, became empty as %s')
                     else:
                         msg = _(b'%d file(s) changed, became %s')
                     msg = msg % (
--- a/tests/test-absorb.t	Sat Jul 18 22:57:28 2020 +0200
+++ b/tests/test-absorb.t	Fri Jul 17 20:24:42 2020 +0200
@@ -530,8 +530,8 @@
   $ hg absorb -av --config rewrite.empty-successor=keep | grep became
   0:bfafb49242db: 1 file(s) changed, became 5:1a2de97fc652
   1:115485984805: 2 file(s) changed, became 6:0c930dfab74c
-  2:30970dbf7b40: 2 file(s) changed, became empty and became 7:df6574ae635c
-  3:a393a58b9a85: 2 file(s) changed, became empty and became 8:ad4bd3462c9e
+  2:30970dbf7b40: 2 file(s) changed, became empty as 7:df6574ae635c
+  3:a393a58b9a85: 2 file(s) changed, became empty as 8:ad4bd3462c9e
   4:1bb0e8cff87a: 2 file(s) changed, became 9:2dbed75af996
   $ hg log -T '{rev} {desc}\n' -Gp
   @  9 empty