[PATCH 2 of 6 evolve-ext-V2] evolve: add flag to enable all of the commands

Laurent Charignon lcharignon at fb.com
Thu Jun 4 18:09:17 CDT 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1433456558 25200
#      Thu Jun 04 15:22:38 2015 -0700
# Node ID b5fbf51f70fe4ecd57579b9b08ed912533a48565
# Parent  a72a896bfc902806d3847915f29c2ffe1db8c37b
evolve: add flag to enable all of the commands

Before this patch, experimental.evolutioncommands was used to selectively enable
some evolve commands. With this patch, one can use the value 'all' to enable all
of the commands.

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -365,7 +365,7 @@
     # extsetup functions.
     evolvecommands = ui.configlist('experimental', 'evolutioncommands')
     evolveopts = ui.configlist('experimental', 'evolution')
-    if not evolveopts or 'all' in evolveopts:
+    if not evolveopts or 'all' in evolveopts or 'all' in evolvecommands:
         # Evolve is fully loaded, don't disable commands
         return
     else:
diff --git a/tests/test-evolve.t b/tests/test-evolve.t
--- a/tests/test-evolve.t
+++ b/tests/test-evolve.t
@@ -1133,6 +1133,16 @@
   
   (use "hg help" for the full list of commands or "hg -v" for details)
   [255]
+  $ cat >> $HGRCPATH <<EOF
+  > [experimental]
+  > evolution=createmarkers
+  > evolutioncommands=all
+  > EOF
+  $ hg prev
+  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
+  [18] a3
+  $ hg up db3d894869b0
+  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
 Restore all of the evolution features
 
@@ -1141,7 +1151,8 @@
   > evolution=all
   > EOF
 
-Check hg evolve --rev on singled out commit
+
+check hg evolve --rev on singled out commit
   $ hg up 19 -C
   1 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ mkcommit j1


More information about the Mercurial-devel mailing list