# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 1522226473 -19800 # Node ID 92a2d3217de90a6af0a0ba0650e339ceee7049b5 # Parent debd2f974be58df7e4ad23faf2bef2d66714f27e evolve: show a message when evolution leads to no changes to commit In case of orphan resolution, evolution may result in no changes to commit. This patch adds a use message in such cases. This is same as the rebase behavior. diff -r debd2f974be5 -r 92a2d3217de9 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Wed Mar 28 13:48:34 2018 +0530 +++ b/hgext3rd/evolve/evolvecmd.py Wed Mar 28 14:11:13 2018 +0530 @@ -578,6 +578,9 @@ for book in oldbookmarks: bmchanges.append((book, nodenew)) else: + if category == 'orphan': + repo.ui.status(_("evolution of %d:%s created no changes " + "to commit\n") % (orig.rev(), orig)) compat.createmarkers(repo, [(repo[nodesrc], ())], operation='evolve') # Behave like rebase, move bookmarks to dest for book in oldbookmarks: @@ -1299,6 +1302,9 @@ # resolving conflicts can lead to empty wdir and node can be None in # those cases ctx = repo[evolvestate['current']] + if node is None: + repo.ui.status(_("evolution of %d:%s created no changes" + " to commit\n") % (ctx.rev(), ctx)) newctx = repo[node] if node is not None else repo['.'] compat.createmarkers(repo, [(ctx, (newctx,))], operation='evolve') diff -r debd2f974be5 -r 92a2d3217de9 tests/test-evolve-continue.t --- a/tests/test-evolve-continue.t Wed Mar 28 13:48:34 2018 +0530 +++ b/tests/test-evolve-continue.t Wed Mar 28 14:11:13 2018 +0530 @@ -128,9 +128,9 @@ continue: hg evolve --continue $ hg diff -XXX: maybe we should add a message here about evolve resulting in no commit $ hg evolve --continue evolving 7:ad0a59d83efe "added e" + evolution of 7:ad0a59d83efe created no changes to commit $ hg glog @ 8:00a5c774cc37 added d diff -r debd2f974be5 -r 92a2d3217de9 tests/test-stabilize-result.t --- a/tests/test-stabilize-result.t Wed Mar 28 13:48:34 2018 +0530 +++ b/tests/test-stabilize-result.t Wed Mar 28 14:11:13 2018 +0530 @@ -40,6 +40,8 @@ perform evolve? [Ny] y hg rebase -r cce2c55b8965 -d fb9d051ec0a4 resolving manifests + evolution of 2:cce2c55b8965 created no changes to commit + $ glog --hidden @ 3:fb9d051ec0a4@default(draft) bk:[changea] changea |