sapling/tests/test-fb-hgext-extorder.t
Kostia Balytskyi b27a46c987 fb-hgext: fix copied fb-hgext tests
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.

Depends on D6675329

Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675344
2018-01-09 03:06:09 -08:00

42 lines
860 B
Perl

Set up repository
$ hg init repo
$ cd repo
$ echo "[extensions]" >> .hg/hgrc
$ echo "extorder=" >> .hg/hgrc
$ echo "rebase =" >> .hg/hgrc
$ echo "dummyext1 = $TESTDIR/dummyext1.py" >> .hg/hgrc
$ echo "dummyext2 = $TESTDIR/dummyext2.py" >> .hg/hgrc
$ echo "histedit =" >> .hg/hgrc
Simple Dependency
$ hg id
ext1: uisetup
ext2: uisetup
ext1: extsetup
ext2: extsetup
000000000000 tip
$ cat >> .hg/hgrc << EOF
> [extorder]
> dummyext1 = dummyext2
> preferfirst = histedit
> preferlast = rebase
> EOF
$ hg id
ext1: uisetup
ext2: uisetup
ext2: extsetup
ext1: extsetup
000000000000 tip
Conflicting deps
$ echo "dummyext2 = dummyext1" >> .hg/hgrc
$ hg id > out.txt 2>&1
[1]
$ grep MercurialExtOrderException < out.txt
hgext.extorder.MercurialExtOrderException: extorder: conflicting extension order