diff --git a/tests/test-bookmark-workflow.t b/tests/test-bookmark-workflow.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1ib29rbWFyay13b3JrZmxvdy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1ib29rbWFyay13b3JrZmxvdy50 100644 --- a/tests/test-bookmark-workflow.t +++ b/tests/test-bookmark-workflow.t @@ -12,12 +12,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -Bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - Skip if Mercurial < 2.1; workflow was different before that $ python -c 'from mercurial import util ; assert \ > util.version() != "unknown" and util.version() >= "2.1"' || exit 80 diff --git a/tests/test-clone.t b/tests/test-clone.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1jbG9uZS50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1jbG9uZS50 100755 --- a/tests/test-clone.t +++ b/tests/test-clone.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-conflict-1.t b/tests/test-conflict-1.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1jb25mbGljdC0xLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1jb25mbGljdC0xLnQ= 100644 --- a/tests/test-conflict-1.t +++ b/tests/test-conflict-1.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ hg init hgrepo1 $ cd hgrepo1 $ echo A > afile diff --git a/tests/test-conflict-2.t b/tests/test-conflict-2.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1jb25mbGljdC0yLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1jb25mbGljdC0yLnQ= 100644 --- a/tests/test-conflict-2.t +++ b/tests/test-conflict-2.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ hg init hgrepo1 $ cd hgrepo1 $ echo A > afile diff --git a/tests/test-convergedmerge.t b/tests/test-convergedmerge.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1jb252ZXJnZWRtZXJnZS50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1jb252ZXJnZWRtZXJnZS50 100644 --- a/tests/test-convergedmerge.t +++ b/tests/test-convergedmerge.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ hg init hgrepo1 $ cd hgrepo1 $ echo A > afile diff --git a/tests/test-empty-working-tree.t b/tests/test-empty-working-tree.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1lbXB0eS13b3JraW5nLXRyZWUudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1lbXB0eS13b3JraW5nLXRyZWUudA== 100644 --- a/tests/test-empty-working-tree.t +++ b/tests/test-empty-working-tree.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-encoding.t b/tests/test-encoding.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1lbmNvZGluZy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1lbmNvZGluZy50 100644 --- a/tests/test-encoding.t +++ b/tests/test-encoding.t @@ -3,12 +3,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL $ GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE diff --git a/tests/test-file-removal.t b/tests/test-file-removal.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1maWxlLXJlbW92YWwudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1maWxlLXJlbW92YWwudA== 100644 --- a/tests/test-file-removal.t +++ b/tests/test-file-removal.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-git-clone.t b/tests/test-git-clone.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1naXQtY2xvbmUudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1naXQtY2xvbmUudA== 100755 --- a/tests/test-git-clone.t +++ b/tests/test-git-clone.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-git-submodules.t b/tests/test-git-submodules.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1naXQtc3VibW9kdWxlcy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1naXQtc3VibW9kdWxlcy50 100644 --- a/tests/test-git-submodules.t +++ b/tests/test-git-submodules.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo1 Initialized empty Git repository in $TESTTMP/gitrepo1/.git/ $ cd gitrepo1 diff --git a/tests/test-git-tags.t b/tests/test-git-tags.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1naXQtdGFncy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1naXQtdGFncy50 100644 --- a/tests/test-git-tags.t +++ b/tests/test-git-tags.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-git-workflow.t b/tests/test-git-workflow.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1naXQtd29ya2Zsb3cudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1naXQtd29ya2Zsb3cudA== 100755 --- a/tests/test-git-workflow.t +++ b/tests/test-git-workflow.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ hg init hgrepo $ cd hgrepo $ echo alpha > alpha diff --git a/tests/test-hg-author.t b/tests/test-hg-author.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1oZy1hdXRob3IudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1oZy1hdXRob3IudA== 100644 --- a/tests/test-hg-author.t +++ b/tests/test-hg-author.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-hg-branch.t b/tests/test-hg-branch.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1oZy1icmFuY2gudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1oZy1icmFuY2gudA== 100644 --- a/tests/test-hg-branch.t +++ b/tests/test-hg-branch.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - TODO stop using this when we're 1.5 only $ filterhash="sed s/71414c4e3c6f/a31e374801c9/;s/698615204564/d93a72262a83/" $ filterhash="$filterhash;s/d93a72262a83/05aed681ccb3/" diff --git a/tests/test-hg-tags.t b/tests/test-hg-tags.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1oZy10YWdzLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1oZy10YWdzLnQ= 100644 --- a/tests/test-hg-tags.t +++ b/tests/test-hg-tags.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-incoming.t b/tests/test-incoming.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1pbmNvbWluZy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1pbmNvbWluZy50 100755 --- a/tests/test-incoming.t +++ b/tests/test-incoming.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - This test only works on hg 1.7 and later $ python -c 'from mercurial import util ; assert \ > util.version() != "unknown" and util.version() > "1.7"' || exit 80 diff --git a/tests/test-keywords.t b/tests/test-keywords.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1rZXl3b3Jkcy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1rZXl3b3Jkcy50 100755 --- a/tests/test-keywords.t +++ b/tests/test-keywords.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-merge.t b/tests/test-merge.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1tZXJnZS50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1tZXJnZS50 100644 --- a/tests/test-merge.t +++ b/tests/test-merge.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-octopus.t b/tests/test-octopus.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1vY3RvcHVzLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1vY3RvcHVzLnQ= 100644 --- a/tests/test-octopus.t +++ b/tests/test-octopus.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-outgoing.t b/tests/test-outgoing.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1vdXRnb2luZy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1vdXRnb2luZy50 100755 --- a/tests/test-outgoing.t +++ b/tests/test-outgoing.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-pull-after-strip.t b/tests/test-pull-after-strip.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXN0cmlwLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1wdWxsLWFmdGVyLXN0cmlwLnQ= 100755 --- a/tests/test-pull-after-strip.t +++ b/tests/test-pull-after-strip.t @@ -1,9 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - this test is busted on hg < 1.5. I'm not sure how to fix it. $ cat > tmp.py <<EOF > import sys @@ -15,9 +12,6 @@ $ hg version | grep version | sed 's/.*(version //' | python tmp.py || exit 80 -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-pull.t b/tests/test-pull.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1wdWxsLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1wdWxsLnQ= 100644 --- a/tests/test-pull.t +++ b/tests/test-pull.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - set up a git repo with some commits, branches and a tag $ git init -q gitrepo $ cd gitrepo diff --git a/tests/test-push-r.t b/tests/test-push-r.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1wdXNoLXIudA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1wdXNoLXIudA== 100755 --- a/tests/test-push-r.t +++ b/tests/test-push-r.t @@ -1,9 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ hg init test $ cd test $ cat >>afile <<EOF diff --git a/tests/test-push.t b/tests/test-push.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1wdXNoLnQ=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1wdXNoLnQ= 100644 --- a/tests/test-push.t +++ b/tests/test-push.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/test-subrepos.t b/tests/test-subrepos.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC1zdWJyZXBvcy50..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC1zdWJyZXBvcy50 100644 --- a/tests/test-subrepos.t +++ b/tests/test-subrepos.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitsubrepo Initialized empty Git repository in $TESTTMP/gitsubrepo/.git/ $ cd gitsubrepo diff --git a/tests/test-tree-decomposition.t b/tests/test-tree-decomposition.t index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdC10cmVlLWRlY29tcG9zaXRpb24udA==..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdC10cmVlLWRlY29tcG9zaXRpb24udA== 100644 --- a/tests/test-tree-decomposition.t +++ b/tests/test-tree-decomposition.t @@ -1,12 +1,6 @@ Load commonly used test logic $ . "$TESTDIR/testutil" -bail if the user does not have git command-line client - $ "$TESTDIR/hghave" git || exit 80 - -bail if the user does not have dulwich - $ python -c 'import dulwich, dulwich.repo' || exit 80 - $ git init gitrepo Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ cd gitrepo diff --git a/tests/testutil b/tests/testutil index 935c4fb1bbfcce3f3c235b1918c55b1bc1f054b9_dGVzdHMvdGVzdHV0aWw=..675f19af79cafd4a95677bf73c4d2663f5cc8022_dGVzdHMvdGVzdHV0aWw= 100755 --- a/tests/testutil +++ b/tests/testutil @@ -11,6 +11,15 @@ echo 'graphlog=' >> $HGRCPATH echo 'mq=' >> $HGRCPATH +# Standard checks for external dependencies +# We use the git command-line client and dulwich in pretty much all the tests. +# Thus, to avoid repetitively declaring that requirement in almost every test, +# we just call the checks in all tests that include this library. +python -c 'import dulwich' || { + echo "skipped: missing feature: dulwich" && exit 80 +} +"$TESTDIR/hghave" git || exit 80 + GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE="2007-01-01 00:00:00 +0000"; export GIT_AUTHOR_DATE