[PATCH evolve-ext] inhbit: make tests work with evolution.createmarkers config

Laurent Charignon lcharignon at fb.com
Tue May 12 20:02:59 UTC 2015


# HG changeset patch
# User Laurent Charignon <lcharignon at fb.com>
# Date 1431458806 25200
#      Tue May 12 12:26:46 2015 -0700
# Node ID 2c5a49240a59b01f81898359e297fe5e768438b8
# Parent  5e82d78f5872c9503d7b6691c594a13794a9b4a4
inhbit: make tests work with evolution.createmarkers config

Before this patch, the test for inhibit was assuming evolve fully running.
For most of the features that inhbit enables, createmarkers is sufficient.
This patch makes the test of inhibit run with the createmarkers config and
only lifts it for operations in the middle of the stack.

diff --git a/tests/test-inhibit.t b/tests/test-inhibit.t
--- a/tests/test-inhibit.t
+++ b/tests/test-inhibit.t
@@ -1,8 +1,12 @@
   $ cat >> $HGRCPATH <<EOF
   > [ui]
   > logtemplate = {rev}:{node|short} {desc}\n
+  > [experimental]
+  > prunestrip=True
+  > evolution=createmarkers
   > [extensions]
   > rebase=
+  > strip=
   > EOF
   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
   $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH
@@ -45,7 +49,7 @@
 
 plain prune
 
-  $ hg prune 1::
+  $ hg strip 1::
   3 changesets pruned
   $ hg log -G
   @  7:18214586bf78 add cJ
@@ -76,7 +80,7 @@
   |/
   o  0:54ccbc537fc2 add cA
   
-  $ hg prune --hidden 1::
+  $ hg strip --hidden 1::
   3 changesets pruned
   $ hg log -G
   @  7:18214586bf78 add cJ
@@ -93,7 +97,7 @@
 after amend
 
   $ echo babar > cJ
-  $ hg amend
+  $ hg commit --amend
   $ hg log -G
   @  9:55c73a90e4b4 add cJ
   |
@@ -134,7 +138,7 @@
 
   $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//'
   20 .hg/store/obsinhibit
-  $ hg prune 7
+  $ hg strip 7
   1 changesets pruned
   $ hg debugobsinhibit --hidden 18214586bf78
   $ wc -m .hg/store/obsinhibit | sed -e 's/^[ \t]*//'
@@ -153,7 +157,7 @@
   o  0:54ccbc537fc2 add cA
   
   $ hg phase --public 7
-  $ hg prune 9
+  $ hg strip 9
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at cf5c4f4554ce
   1 changesets pruned
@@ -225,7 +229,7 @@
   |/
   o  0:54ccbc537fc2 add cA
   
-  $ hg prune --hidden 1::
+  $ hg strip --hidden 1::
   3 changesets pruned
   $ hg log -G
   @  9:55c73a90e4b4 add cJ
@@ -377,7 +381,7 @@
   |/
   o  0:54ccbc537fc2 add cA
   
-  $ hg prune 10:
+  $ hg strip --hidden 10:
   2 changesets pruned
   $ hg log -G
   @  9:55c73a90e4b4 add cJ
@@ -423,8 +427,15 @@
   o  0:54ccbc537fc2 add cA
   
 Check that amending in the middle of a stack does not show obsolete revs
+Since we are doing operation in the middle of the stack we cannot just
+have createmarkers as we are creating instability
 
-  $ hg prune 1::
+  $ cat >> $HGRCPATH <<EOF
+  > [experimental]
+  > evolution=all
+  > EOF
+
+  $ hg strip --hidden 1::
   5 changesets pruned
   $ hg log -G
   @  9:55c73a90e4b4 add cJ
@@ -503,7 +514,7 @@
   |/
   o  14:d66ccb8c5871 add cL
   |
-  $ hg prune -r 104eed5354c7
+  $ hg strip -r 104eed5354c7
   1 changesets pruned
   $ hg rebase -d 18 -r 16 --keep
   rebasing 16:a438c045eb37 "add cN"
@@ -522,7 +533,7 @@
 Test prunestrip
 
   $ hg book foo -r 104eed5354c7
-  $ hg strip -r 210589181b14 --config experimental.prunestrip=True --config extensions.strip=
+  $ hg strip -r 210589181b14
   0 files updated, 0 files merged, 1 files removed, 0 files unresolved
   working directory now at d66ccb8c5871
   2 changesets pruned


More information about the Mercurial-devel mailing list