# HG changeset patch # User Martin von Zweigbergk # Date 1516816512 28800 # Node ID f7ecb11d71bb2cafcc0f137d1a07125d7a475bd1 # Parent 8275ef0991356f6550f50feb8e80bc9360d768cb update: show "use 'hg evolve' to..." hint iff evolve command enabled Before this patch, one had to enable *all* commands (by including "allnewcommands" in the experimental.evolution config) for the hint to be shown. diff -r 8275ef099135 -r f7ecb11d71bb hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Mon Jan 22 14:10:59 2018 +0530 +++ b/hgext3rd/evolve/__init__.py Wed Jan 24 09:55:12 2018 -0800 @@ -710,7 +710,8 @@ ui.warn(msg % shortnode) # Check that evolve is activated for performance reasons - if ui.quiet or not obsolete.isenabled(repo, commandopt): + evolvecommandenabled = any('evolve' in e for e in cmdtable) + if ui.quiet or not evolvecommandenabled: return # Show a warning for helping the user to solve the issue diff -r 8275ef099135 -r f7ecb11d71bb tests/test-evolve.t --- a/tests/test-evolve.t Mon Jan 22 14:10:59 2018 +0530 +++ b/tests/test-evolve.t Wed Jan 24 09:55:12 2018 -0800 @@ -1250,6 +1250,24 @@ (use 'hg help' for the full list of commands or 'hg -v' for details) [255] +Shows "use 'hg evolve' to..." hints iff the evolve command is enabled + + $ hg --hidden up 14 + updating to a hidden changeset 484fb3cfa7f2 + (hidden revision '484fb3cfa7f2' was rewritten as: 98e171e2f272) + 2 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory parent is obsolete! (484fb3cfa7f2) + $ cat >> $HGRCPATH < [experimental] + > evolutioncommands=evolve + > EOF + $ hg --hidden up 15 + updating to a hidden changeset daa1ff1c7fbd + (hidden revision 'daa1ff1c7fbd' was rewritten as: 0c049e4e5422) + 1 files updated, 0 files merged, 1 files removed, 0 files unresolved + working directory parent is obsolete! (daa1ff1c7fbd) + (use 'hg evolve' to update to its successor: 0c049e4e5422) + Restore all of the evolution features $ cat >> $HGRCPATH <