tests/test-inhibit.t
changeset 1339 0e2eb196923a
parent 1338 77cbf9121e8a
child 1343 41628bd60ee6
--- a/tests/test-inhibit.t	Thu May 14 15:59:06 2015 -0700
+++ b/tests/test-inhibit.t	Thu May 14 11:23:40 2015 -0700
@@ -9,6 +9,7 @@
   > strip=
   > EOF
   $ echo "evolve=$(echo $(dirname $TESTDIR))/hgext/evolve.py" >> $HGRCPATH
+  $ echo "directaccess=$(echo $(dirname $TESTDIR))/hgext/directaccess.py" >> $HGRCPATH
   $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH
   $ mkcommit() {
   >    echo "$1" > "$1"
@@ -562,17 +563,17 @@
   added 2 changesets with 1 changes to 2 files (+1 heads)
   (run 'hg heads' to see heads, 'hg merge' to merge)
 
-Only allow direct access and check that evolve works like before
+ Only allow direct access and check that evolve works like before
   $ cat >> $HGRCPATH <<EOF
-  > [inhibit]
-  > onlydirectaccess = True
+  > [extensions]
+  > inhibit=!
   > EOF
 
   $ hg up 15
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  working directory parent is obsolete!
   $ echo "CM" > cM
   $ hg amend
-  1 new unstable changesets
   $ hg log -G
   @  21:721c3c279519 add cM
   |
@@ -582,10 +583,8 @@
   |/
   o  14:d66ccb8c5871 add cL
   |
-  | o  9:55c73a90e4b4 add cJ
-  | |
-  o |  7:18214586bf78 add cJ
-  |/
+  o  7:18214586bf78 add cJ
+  |
   o  6:cf5c4f4554ce add cH
   |
   o  5:5419eb264a33 add cG
@@ -594,3 +593,15 @@
   |
   o  0:54ccbc537fc2 add cA
   
+
+Inhibit should not work without directaccess
+  $ cat >> $HGRCPATH <<EOF
+  > [extensions]
+  > directaccess=!
+  > EOF
+  $ echo "inhibit=$(echo $(dirname $TESTDIR))/hgext/inhibit.py" >> $HGRCPATH
+
+  $ hg up 15
+  abort: Cannot use inhibit without the direct access extension
+  [255]
+