Patchwork D8765: absorb: improve message for the case when changeset became empty

login
register
mail settings
Submitter phabricator
Date July 17, 2020, 6:25 p.m.
Message ID <differential-rev-PHID-DREV-obqabgfdbeiwt6lbij7n-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/46795/
State Superseded
Headers show

Comments

phabricator - July 17, 2020, 6:25 p.m.
mjacob created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  In changeset f55099982bc5 <https://phab.mercurial-scm.org/rHGf55099982bc517c349bf46fab53b8696f0615c17>, 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.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D8765

AFFECTED FILES
  hgext/absorb.py
  tests/test-absorb.t

CHANGE DETAILS




To: mjacob, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/tests/test-absorb.t b/tests/test-absorb.t
--- a/tests/test-absorb.t
+++ b/tests/test-absorb.t
@@ -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
diff --git a/hgext/absorb.py b/hgext/absorb.py
--- a/hgext/absorb.py
+++ b/hgext/absorb.py
@@ -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 % (