changeset 4453:700b8b3a5a54

evolve: clarify output when phase-divergence resolution results in no change I found it pretty confusing that it said "committed as abcd1234" when no commit was created.
author Martin von Zweigbergk <martinvonz@google.com>
date Wed, 20 Mar 2019 09:19:02 -0700
parents 444e664616c7
children f530850c8184
files hgext3rd/evolve/evolvecmd.py tests/test-evolve-abort-phasediv.t tests/test-evolve-phase-divergence.t
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/hgext3rd/evolve/evolvecmd.py	Tue Mar 12 09:44:05 2019 -0700
+++ b/hgext3rd/evolve/evolvecmd.py	Wed Mar 20 09:19:02 2019 -0700
@@ -313,9 +313,11 @@
         newid = repo.commitctx(new)
         replacementnode = newid
     if newid is None:
+        repo.ui.status(_('no changes to commit\n'))
         obsolete.createmarkers(repo, [(tmpctx, ())], operation='evolve')
         newid = prec.node()
     else:
+        repo.ui.status(_('committed as %s\n') % nodemod.short(newid))
         phases.retractboundary(repo, tr, bumped.phase(), [newid])
         obsolete.createmarkers(repo, [(tmpctx, (repo[newid],))],
                                flag=obsolete.bumpedfix, operation='evolve')
@@ -323,7 +325,6 @@
     # if rebased happened, update bookmarks from there too
     if rebasedbmupdate:
         rebasedbmupdate(newid)
-    repo.ui.status(_('committed as %s\n') % nodemod.short(newid))
     # reroute the working copy parent to the new changeset
     with repo.dirstate.parentchange():
         repo.dirstate.setparents(newid, nodemod.nullid)
--- a/tests/test-evolve-abort-phasediv.t	Tue Mar 12 09:44:05 2019 -0700
+++ b/tests/test-evolve-abort-phasediv.t	Wed Mar 20 09:19:02 2019 -0700
@@ -208,7 +208,7 @@
   atop:[4] added d
   rebasing to destination parent: ca1b80f7960a
   computing new diff
-  committed as c41c793e0ef1
+  no changes to commit
   recreate:[9] added c
   atop:[3] added c
   rebasing to destination parent: b1661037fa25
--- a/tests/test-evolve-phase-divergence.t	Tue Mar 12 09:44:05 2019 -0700
+++ b/tests/test-evolve-phase-divergence.t	Wed Mar 20 09:19:02 2019 -0700
@@ -197,7 +197,7 @@
   recreate:[2] tweak a
   atop:[1] modify a
   computing new diff
-  committed as 4d1169d82e47
+  no changes to commit
   working directory is now at 4d1169d82e47
 
   $ hg glog
@@ -600,7 +600,7 @@
   rebasing to destination parent: 502e73736632
   (leaving bookmark bm)
   computing new diff
-  committed as 2352021b3785
+  no changes to commit
   working directory is now at 2352021b3785
 
 XXX: we should move bookmark here
@@ -920,7 +920,7 @@
   atop:[23] added g
   rebasing to destination parent: 21ae52e414e6
   computing new diff
-  committed as 428f7900a969
+  no changes to commit
   working directory is now at 428f7900a969
 
   $ hg glog -r f3794e5a91dc::