codemod: use vendored directaccess and inhibit extension in tests

Summary:
This diff makes the tests use the vendored directaccess and inhibit instead the
foreign ones.

Test Plan: arc unit

Reviewers: #mercurial, sid0

Reviewed By: sid0

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D5142981

Signature: t1:5142981:1496173851:3a8f3a1c689711dbef517c893bf72c90ab144761
This commit is contained in:
Jun Wu 2017-05-30 12:56:40 -07:00
parent cc95aa58ff
commit 01a471b159
20 changed files with 62 additions and 62 deletions

View File

@ -1,14 +1,14 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/allowunstable.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/allowunstable.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> allowunstable=$TESTTMP/allowunstable.py > allowunstable=$TESTTMP/allowunstable.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> histedit= > histedit=
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> record= > record=
> [experimental] > [experimental]

View File

@ -1,13 +1,13 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/debuginhibit.py $TESTTMP $ cp $extpath/hgext3rd/debuginhibit.py $TESTTMP
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> debuginhibit=$TESTTMP/debuginhibit.py > debuginhibit=$TESTTMP/debuginhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> [debuginhibit] > [debuginhibit]
> printnodes = true > printnodes = true
> printstack = true > printstack = true

View File

@ -1,15 +1,15 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/allowunstable.py $TESTTMP $ cp $extpath/hgext3rd/allowunstable.py $TESTTMP
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP $ cp $extpath/hgext3rd/fbamend.py $TESTTMP
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> allowunstable=$TESTTMP/allowunstable.py > allowunstable=$TESTTMP/allowunstable.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,13 +1,13 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,14 +1,14 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> allowunstable= > allowunstable=
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,13 +1,13 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,5 +1,5 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/allowunstable.py $TESTTMP $ cp $extpath/hgext3rd/allowunstable.py $TESTTMP
$ cp $extpath/hgext3rd/debuginhibit.py $TESTTMP $ cp $extpath/hgext3rd/debuginhibit.py $TESTTMP
@ -8,10 +8,10 @@ Set up test environment.
> [extensions] > [extensions]
> allowunstable=$TESTTMP/allowunstable.py > allowunstable=$TESTTMP/allowunstable.py
> debuginhibit=$TESTTMP/debuginhibit.py > debuginhibit=$TESTTMP/debuginhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,13 +1,13 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP $ cp $extpath/hgext3rd/fbamend.py $TESTTMP
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -1,15 +1,15 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/allowunstable.py $TESTTMP $ cp $extpath/hgext3rd/allowunstable.py $TESTTMP
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP $ cp $extpath/hgext3rd/fbamend.py $TESTTMP
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> allowunstable=$TESTTMP/allowunstable.py > allowunstable=$TESTTMP/allowunstable.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> strip= > strip=
> [experimental] > [experimental]

View File

@ -1,13 +1,13 @@
Set up test environment. Set up test environment.
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/fbamend.py $TESTTMP # use $TESTTMP substitution in message
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> strip= > strip=
> tweakdefaults= > tweakdefaults=

View File

@ -481,7 +481,7 @@ Test fbamend with inhibit
$ . $TESTDIR/require-ext.sh inhibit $ . $TESTDIR/require-ext.sh inhibit
$ cat >> .hg/hgrc <<EOF $ cat >> .hg/hgrc <<EOF
> [extensions] > [extensions]
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> EOF > EOF
$ cd .. $ cd ..
$ hg init inhibitrepo $ hg init inhibitrepo
@ -595,11 +595,10 @@ Make sure that unamend does not work without inhibit
[255] [255]
Make sure that unamend works as expected with inhibit Make sure that unamend works as expected with inhibit
$ . $TESTDIR/require-ext.sh directaccess
$ cat >> .hg/hgrc <<EOF $ cat >> .hg/hgrc <<EOF
> [extensions] > [extensions]
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> EOF > EOF
$ hg unamend $ hg unamend

View File

@ -1,4 +1,4 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ . "$TESTDIR/histedit-helpers.sh" $ . "$TESTDIR/histedit-helpers.sh"
Setup Setup
@ -9,11 +9,11 @@ Setup
$ cat >> $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
> [extensions] > [extensions]
> histedit= > histedit=
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> fbamend= > fbamend=
> evolve= > evolve=
> rebase= > rebase=
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> fbhistedit= > fbhistedit=
> [experimental] > [experimental]
> evolution = createmarkers > evolution = createmarkers

View File

@ -416,12 +416,12 @@ Push to svn server should fail
[255] [255]
Scratch pull of pruned commits Scratch pull of pruned commits
$ . $TESTDIR/require-ext.sh inhibit directaccess evolve $ . $TESTDIR/require-ext.sh evolve
$ cat >> .hg/hgrc << EOF $ cat >> .hg/hgrc << EOF
> [extensions] > [extensions]
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> [experimental] > [experimental]
> evolution=createmarkers > evolution=createmarkers
> evolutioncommands=obsolete > evolutioncommands=obsolete

View File

@ -1,4 +1,4 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
Test of warning for evolve users when inhibit is enabled Test of warning for evolve users when inhibit is enabled
$ cat >> $HGRCPATH <<EOF $ cat >> $HGRCPATH <<EOF
@ -9,8 +9,8 @@ Test of warning for evolve users when inhibit is enabled
> [inhibit] > [inhibit]
> cutoff=2015-07-04 > cutoff=2015-07-04
> [extensions] > [extensions]
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> EOF > EOF
$ echo "inhibitwarn = $TESTDIR/../hgext3rd/inhibitwarn.py" >> $HGRCPATH $ echo "inhibitwarn = $TESTDIR/../hgext3rd/inhibitwarn.py" >> $HGRCPATH

View File

@ -1,4 +1,4 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit remotenames $ . $TESTDIR/require-ext.sh evolve remotenames
Setup Setup
@ -14,8 +14,8 @@ Test that hg pull creates obsolescence markers for landed diffs
> evolution= createmarkers > evolution= createmarkers
> rebaseskipobsolete=True > rebaseskipobsolete=True
> [extensions] > [extensions]
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> strip= > strip=
> rebase= > rebase=

View File

@ -1,4 +1,4 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit remotenames $ . $TESTDIR/require-ext.sh evolve remotenames
Setup Setup
@ -14,8 +14,8 @@ Test that hg pull creates obsolescence markers for landed diffs
> evolution= createmarkers > evolution= createmarkers
> rebaseskipobsolete=True > rebaseskipobsolete=True
> [extensions] > [extensions]
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> strip= > strip=
> rebase= > rebase=

View File

@ -194,12 +194,11 @@ a new hash for them
Reset + Inhibit tests, with inhibit reset revives the same commit Reset + Inhibit tests, with inhibit reset revives the same commit
$ . $TESTDIR/require-ext.sh directaccess inhibit
$ cat >> .hg/hgrc <<EOF $ cat >> .hg/hgrc <<EOF
> [extensions] > [extensions]
> evolve = > evolve=
> inhibit = > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> directaccess = > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> rebase= > rebase=
> EOF > EOF

View File

@ -1,13 +1,13 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/smartlog.py $TESTTMP # use $TESTTMP substitution in message $ cp $extpath/hgext3rd/smartlog.py $TESTTMP # use $TESTTMP substitution in message
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP $ cp $extpath/hgext3rd/fbamend.py $TESTTMP
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> directaccess = > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> smartlog=$TESTTMP/smartlog.py > smartlog=$TESTTMP/smartlog.py
> [experimental] > [experimental]

View File

@ -1,4 +1,4 @@
$ . $TESTDIR/require-ext.sh directaccess evolve inhibit $ . $TESTDIR/require-ext.sh evolve
$ extpath=`dirname $TESTDIR` $ extpath=`dirname $TESTDIR`
$ cp $extpath/hgext3rd/allowunstable.py $TESTTMP $ cp $extpath/hgext3rd/allowunstable.py $TESTTMP
$ cp $extpath/hgext3rd/fbamend.py $TESTTMP $ cp $extpath/hgext3rd/fbamend.py $TESTTMP
@ -7,11 +7,11 @@
$ cat >> $HGRCPATH << EOF $ cat >> $HGRCPATH << EOF
> [extensions] > [extensions]
> allowunstable=$TESTTMP/allowunstable.py > allowunstable=$TESTTMP/allowunstable.py
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> evolve= > evolve=
> fbamend=$TESTTMP/fbamend.py > fbamend=$TESTTMP/fbamend.py
> histedit= > histedit=
> inhibit= > inhibit=$TESTDIR/../hgext3rd/inhibit.py
> rebase= > rebase=
> smartlog=$TESTTMP/smartlog.py > smartlog=$TESTTMP/smartlog.py
> tweakdefaults=$TESTTMP/tweakdefaults.py > tweakdefaults=$TESTTMP/tweakdefaults.py

View File

@ -478,7 +478,7 @@ Test non-remotenames use of pull --rebase and --update requires --dest
Prepare a repo for testing divergence warnings with respect to inhibit extension Prepare a repo for testing divergence warnings with respect to inhibit extension
and allowance of prune rebases and allowance of prune rebases
$ . $TESTDIR/require-ext.sh directaccess evolve $ . $TESTDIR/require-ext.sh evolve
$ hg init repodiv && cd repodiv $ hg init repodiv && cd repodiv
$ cat >> .hg/hgrc << EOF $ cat >> .hg/hgrc << EOF
> [experimental] > [experimental]
@ -488,7 +488,7 @@ and allowance of prune rebases
> [extensions] > [extensions]
> strip= > strip=
> evolve= > evolve=
> directaccess= > directaccess=$TESTDIR/../hgext3rd/directaccess.py
> EOF > EOF
$ echo root > root && hg ci -Am root # rev 0 $ echo root > root && hg ci -Am root # rev 0
adding root adding root
@ -516,7 +516,9 @@ Test that we show divergence warning if inhibit is disabled
[255] [255]
Test that we do not show divergence warning if inhibit is enabled Test that we do not show divergence warning if inhibit is enabled
$ echo "inhibit=" >> .hg/hgrc $ cat >> .hg/hgrc <<EOF
> inhibit=$TESTDIR/../hgext3rd/inhibit.py
> EOF
$ hg rebase -r 1 -d 3 --hidden $ hg rebase -r 1 -d 3 --hidden
rebasing 1:09d39afb522a "a" rebasing 1:09d39afb522a "a"