Commits

David Carr committed e48a3f3

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.

Comments (0)

Files changed (21)

tests/test-conflict-1.t

 
   $ 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 ..

tests/test-conflict-2.t

 
   $ 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 ..

tests/test-convergedmerge.t

 
   $ 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 ..

tests/test-empty-working-tree.t

 
   $ 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 ..

tests/test-encoding.t

 
   $ 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
   $ 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 ..

tests/test-file-removal.t

 
   $ 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'
   $ 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 ..

tests/test-git-clone.t

 
   $ 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'

tests/test-git-submodules.t

 
   $ 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'
 
   $ 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'

tests/test-git-tags.t

 
   $ 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

tests/test-hg-author.t

 
   $ 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

tests/test-hg-branch.t

 
   $ 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

tests/test-hg-tags.t

 
   $ 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

tests/test-incoming.t

 
   $ 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

tests/test-keywords.t

 
   $ 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'

tests/test-merge.t

 
   $ 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'
   $ 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 ..

tests/test-octopus.t

 
   $ 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
   $ 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 ..

tests/test-outgoing.t

 
   $ 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

tests/test-pull-after-strip.t

 
   $ 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'

tests/test-pull.t

 
   $ 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'

tests/test-push.t

 
   $ 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

tests/test-tree-decomposition.t

 
   $ 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
   $ 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 ..