changeset 251:ff2d4f541ae9

tests: work around output variations in newer git versions
author Abderrahim Kitouni <a.kitouni@gmail.com>
date Wed, 19 Aug 2009 21:13:07 +0100
parents bfe6fd2fdb9b
children 3e0eb85a83a7 442fe2ca104d
files tests/test-empty-working-tree tests/test-empty-working-tree.out tests/test-merge tests/test-merge.out tests/test-octopus tests/test-octopus.out tests/test-outgoing tests/test-pull tests/test-push tests/test-tree-decomposition tests/test-tree-decomposition.out
diffstat 11 files changed, 20 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-empty-working-tree
+++ b/tests/test-empty-working-tree
@@ -21,7 +21,7 @@
 cd gitrepo
 git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
 
-git commit --allow-empty -m empty
+git commit --allow-empty -m empty >/dev/null 2>/dev/null || echo "hg commit error"
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-empty-working-tree.out
+++ b/tests/test-empty-working-tree.out
@@ -1,6 +1,5 @@
 Initialized empty Git repository in gitrepo/.git/
 
-Created initial commit 6782568: empty
 Initialized empty Git repository in gitrepo2/.git/
 
 importing Hg objects into Git
--- a/tests/test-merge
+++ b/tests/test-merge
@@ -34,12 +34,12 @@
 git add alpha
 commit -m 'add alpha'
 
-git checkout -b beta
+git checkout -b beta 2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
 
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo gamma > gamma
 git add gamma
 commit -m 'add gamma'
@@ -70,8 +70,8 @@
 
 cd ..
 cd gitrepo2
-git log master
-git log beta
+git log master | sed 's/\.\.\.//g'
+git log beta | sed 's/\.\.\.//g'
 
 cd ..
 kill `cat gitdaemon.pid`
--- a/tests/test-merge.out
+++ b/tests/test-merge.out
@@ -23,7 +23,7 @@
 at: 0/4
 creating and sending data
 commit 5806851511aaf3bfe813ae3a86c5027165fa9b96
-Merge: e5023f9... 9497a4e...
+Merge: e5023f9 9497a4e
 Author: test <test@example.org>
 Date:   Mon Jan 1 00:00:12 2007 +0000
 
--- a/tests/test-octopus
+++ b/tests/test-octopus
@@ -35,17 +35,17 @@
 git add alpha
 commit -m 'add alpha'
 
-git checkout -b branch1
+git checkout -b branch1 2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
 
-git checkout -b branch2 master
+git checkout -b branch2 master 2>&1 | sed s/\'/\"/g
 echo gamma > gamma
 git add gamma
 commit -m 'add gamma'
 
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo delta > delta
 git add delta
 commit -m 'add delta'
@@ -74,7 +74,7 @@
 hg push git://localhost/gitrepo2
 
 cd ../gitrepo2
-git log
+git log | sed s/\\.\\.\\.//g
 
 cd ..
 kill `cat gitdaemon.pid`
--- a/tests/test-octopus.out
+++ b/tests/test-octopus.out
@@ -70,7 +70,7 @@
 at: 0/6
 creating and sending data
 commit f0c7ec180419a130636d0c333fc34c1462cab4b5
-Merge: d8e22dd... 9497a4e... e5023f9...
+Merge: d8e22dd 9497a4e e5023f9
 Author: test <test@example.org>
 Date:   Mon Jan 1 00:00:13 2007 +0000
 
--- a/tests/test-outgoing
+++ b/tests/test-outgoing
@@ -73,7 +73,7 @@
 echo % some more work on master from git
 cd gitrepo
 
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo delta > delta
 git add delta
 commit -m "add delta"
--- a/tests/test-pull
+++ b/tests/test-pull
@@ -36,7 +36,7 @@
 
 git tag alpha
 
-git checkout -b beta
+git checkout -b beta 2>&1 | sed s/\'/\"/g
 echo beta > beta
 git add beta
 commit -m 'add beta'
--- a/tests/test-push
+++ b/tests/test-push
@@ -72,7 +72,7 @@
 git branch -v
 
 echo % some more work on master from git
-git checkout master
+git checkout master 2>&1 | sed s/\'/\"/g
 echo delta > delta
 git add delta
 commit -m "add delta"
--- a/tests/test-tree-decomposition
+++ b/tests/test-tree-decomposition
@@ -33,11 +33,11 @@
 mkdir d1
 touch d1/f1 d1/f2
 git add d1/f1 d1/f2
-git commit -m initial
+commit -m initial
 
 mkdir d2
 git mv d1/f2 d2/f2
-git commit -m 'rename'
+commit -m 'rename'
 
 cd ..
 mkdir gitrepo2
--- a/tests/test-tree-decomposition.out
+++ b/tests/test-tree-decomposition.out
@@ -1,12 +1,5 @@
 Initialized empty Git repository in gitrepo/.git/
 
-Created initial commit 60fd61f: initial
- 0 files changed, 0 insertions(+), 0 deletions(-)
- create mode 100644 d1/f1
- create mode 100644 d1/f2
-Created commit a2e8665: rename
- 1 files changed, 0 insertions(+), 0 deletions(-)
- rename {d1 => d2}/f2 (100%)
 Initialized empty Git repository in gitrepo2/.git/
 
 importing Hg objects into Git
@@ -24,14 +17,14 @@
 importing Hg objects into Git
 at: 0/2
 creating and sending data
-commit a2e8665d117167742ceb040f1669a73289d79ac8
+commit 7d84da95f2caf7a65833ae580fe5a08a0c3cb6b2
 Author: test <test@example.org>
-Date:   Mon Jan 1 00:00:00 2007 +0000
+Date:   Mon Jan 1 00:00:11 2007 +0000
 
     rename
 
-commit 60fd61fbaca983e6d0ee911668ef7547abbf720c
+commit 48e6424b6487f2a16e901f72fe52168b40278f5b
 Author: test <test@example.org>
-Date:   Mon Jan 1 00:00:00 2007 +0000
+Date:   Mon Jan 1 00:00:10 2007 +0000
 
     initial