# HG changeset patch # User David M. Carr <david@carrclan.us> # Date 1347583782 14400 # Thu Sep 13 20:49:42 2012 -0400 # Node ID e48a3f30b73c194b2d0968753f71dab39614c7dc # Parent bc7b18c2e5ef9119d6e85a584c69ff5b60ded801 tests: remove piping of command git init to remove leading path In many cases we were piping to a python script to strip out the varying leading path to the test repos. This is no longer needed, as the modern run-test.py automatically substitutes the leading path as $TESTTMP. Eliminating the piping makes the tests easier to read and write, as well as allowing the exit codes to be verified by the test. diff --git a/tests/test-conflict-1.t b/tests/test-conflict-1.t --- a/tests/test-conflict-1.t +++ b/tests/test-conflict-1.t @@ -54,9 +54,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-conflict-2.t b/tests/test-conflict-2.t --- a/tests/test-conflict-2.t +++ b/tests/test-conflict-2.t @@ -54,9 +54,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-convergedmerge.t b/tests/test-convergedmerge.t --- a/tests/test-convergedmerge.t +++ b/tests/test-convergedmerge.t @@ -55,9 +55,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-empty-working-tree.t b/tests/test-empty-working-tree.t --- a/tests/test-empty-working-tree.t +++ b/tests/test-empty-working-tree.t @@ -19,18 +19,16 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ git commit --allow-empty -m empty >/dev/null 2>/dev/null || echo "git commit error" $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-encoding.t b/tests/test-encoding.t --- a/tests/test-encoding.t +++ b/tests/test-encoding.t @@ -31,9 +31,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ utf-8 encoded commit message $ echo alpha > alpha @@ -51,9 +50,8 @@ $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-file-removal.t b/tests/test-file-removal.t --- a/tests/test-file-removal.t +++ b/tests/test-file-removal.t @@ -29,9 +29,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' @@ -56,9 +55,8 @@ $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-git-clone.t b/tests/test-git-clone.t --- a/tests/test-git-clone.t +++ b/tests/test-git-clone.t @@ -29,9 +29,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' diff --git a/tests/test-git-submodules.t b/tests/test-git-submodules.t --- a/tests/test-git-submodules.t +++ b/tests/test-git-submodules.t @@ -29,9 +29,8 @@ $ mkdir gitrepo1 $ cd gitrepo1 - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo1/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo1/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' @@ -39,9 +38,8 @@ $ mkdir gitsubrepo $ cd gitsubrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitsubrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitsubrepo/.git/ $ echo beta > beta $ git add beta $ commit -m 'add beta' diff --git a/tests/test-git-tags.t b/tests/test-git-tags.t --- a/tests/test-git-tags.t +++ b/tests/test-git-tags.t @@ -36,9 +36,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ git config receive.denyCurrentBranch ignore $ echo alpha > alpha $ git add alpha diff --git a/tests/test-hg-author.t b/tests/test-hg-author.t --- a/tests/test-hg-author.t +++ b/tests/test-hg-author.t @@ -35,9 +35,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-hg-branch.t b/tests/test-hg-branch.t --- a/tests/test-hg-branch.t +++ b/tests/test-hg-branch.t @@ -39,9 +39,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-hg-tags.t b/tests/test-hg-tags.t --- a/tests/test-hg-tags.t +++ b/tests/test-hg-tags.t @@ -35,9 +35,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-incoming.t b/tests/test-incoming.t --- a/tests/test-incoming.t +++ b/tests/test-incoming.t @@ -39,9 +39,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-keywords.t b/tests/test-keywords.t --- a/tests/test-keywords.t +++ b/tests/test-keywords.t @@ -28,9 +28,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' diff --git a/tests/test-merge.t b/tests/test-merge.t --- a/tests/test-merge.t +++ b/tests/test-merge.t @@ -29,9 +29,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' @@ -58,9 +57,8 @@ $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-octopus.t b/tests/test-octopus.t --- a/tests/test-octopus.t +++ b/tests/test-octopus.t @@ -29,9 +29,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha @@ -68,9 +67,8 @@ $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd .. diff --git a/tests/test-outgoing.t b/tests/test-outgoing.t --- a/tests/test-outgoing.t +++ b/tests/test-outgoing.t @@ -32,9 +32,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-pull-after-strip.t b/tests/test-pull-after-strip.t --- a/tests/test-pull-after-strip.t +++ b/tests/test-pull-after-strip.t @@ -43,9 +43,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' diff --git a/tests/test-pull.t b/tests/test-pull.t --- a/tests/test-pull.t +++ b/tests/test-pull.t @@ -29,9 +29,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha $ commit -m 'add alpha' diff --git a/tests/test-push.t b/tests/test-push.t --- a/tests/test-push.t +++ b/tests/test-push.t @@ -35,9 +35,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ echo alpha > alpha $ git add alpha diff --git a/tests/test-tree-decomposition.t b/tests/test-tree-decomposition.t --- a/tests/test-tree-decomposition.t +++ b/tests/test-tree-decomposition.t @@ -28,9 +28,8 @@ $ mkdir gitrepo $ cd gitrepo - $ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo/.git/ - + $ git init + Initialized empty Git repository in $TESTTMP/gitrepo/.git/ $ mkdir d1 $ echo a > d1/f1 @@ -51,9 +50,8 @@ $ cd .. $ mkdir gitrepo2 $ cd gitrepo2 - $ git init --bare | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')" - Initialized empty Git repository in gitrepo2/ - + $ git init --bare + Initialized empty Git repository in $TESTTMP/gitrepo2/ dulwich does not presently support local git repos, workaround $ cd ..