Skip to content
Snippets Groups Projects
Commit 5ee5f768 authored by David M. Carr's avatar David M. Carr
Browse files

tests: unify test-hg-author

parent 082e2a2d
No related branches found
No related tags found
No related merge requests found
Initialized empty Git repository in gitrepo/.git/
Switched to a new branch 'not-master'
importing git objects into hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:cffa0e8d
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:2b9ec6a4
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:fee30180
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:d1659250
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:ee985f12
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:d21e26b4
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:8c878c97
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:1e03e913
@ changeset: 8:d3c51ce68cfd
| tag: default/master
| tag: tip
| user: test >test@example.com>
| date: Mon Jan 01 00:00:18 2007 +0000
| summary: add theta
|
o changeset: 7:b90e988091a2
| user: test < test@example.com >
| date: Mon Jan 01 00:00:17 2007 +0000
| summary: add eta
|
o changeset: 6:7ede2f971cae
| user: test
| date: Mon Jan 01 00:00:16 2007 +0000
| summary: add zeta
|
o changeset: 5:1454a94056ec
| user: name <test@example.com
| date: Mon Jan 01 00:00:15 2007 +0000
| summary: add epsilon
|
o changeset: 4:a045fd599678
| user: name<test@example.com>
| date: Mon Jan 01 00:00:14 2007 +0000
| summary: add delta
|
o changeset: 3:8da3ab8b31d0
| user: <test@example.com>
| date: Mon Jan 01 00:00:13 2007 +0000
| summary: add gamma
|
o changeset: 2:92d33c0dd6e1
| user: test <test@example.com> (comment)
| date: Mon Jan 01 00:00:12 2007 +0000
| summary: modify beta
|
o changeset: 1:0564f526fb0f
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: add beta
|
o changeset: 0:3442585be8a6
tag: default/not-master
user: test <test@example.org>
date: Mon Jan 01 00:00:10 2007 +0000
summary: add alpha
importing git objects into hg
8 files updated, 0 files merged, 0 files removed, 0 files unresolved
@ changeset: 8:efec0270e295
| tag: default/master
| tag: tip
| user: test ?test@example.com <test ?test@example.com>
| date: Mon Jan 01 00:00:18 2007 +0000
| summary: add theta
|
o changeset: 7:8ab87d5066e4
| user: test <test@example.com>
| date: Mon Jan 01 00:00:17 2007 +0000
| summary: add eta
|
o changeset: 6:ff226cc916bd
| user: test
| date: Mon Jan 01 00:00:16 2007 +0000
| summary: add zeta
|
o changeset: 5:5f1557c62c53
| user: name <test@example.com>
| date: Mon Jan 01 00:00:15 2007 +0000
| summary: add epsilon
|
o changeset: 4:fc51727b28fe
| user: name <test@example.com>
| date: Mon Jan 01 00:00:14 2007 +0000
| summary: add delta
|
o changeset: 3:8da3ab8b31d0
| user: <test@example.com>
| date: Mon Jan 01 00:00:13 2007 +0000
| summary: add gamma
|
o changeset: 2:92d33c0dd6e1
| user: test <test@example.com> (comment)
| date: Mon Jan 01 00:00:12 2007 +0000
| summary: modify beta
|
o changeset: 1:0564f526fb0f
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: add beta
|
o changeset: 0:3442585be8a6
tag: default/not-master
user: test <test@example.org>
date: Mon Jan 01 00:00:10 2007 +0000
summary: add alpha
commit 1e03e913eca571b86ee06d3c1ddd795dde9ca917
Author: test ?test@example.com <test ?test@example.com>
Date: Mon Jan 1 00:00:18 2007 +0000
add theta
commit 8c878c9764e96e67ed9f62b3f317d156bf71bc52
Author: test <test@example.com>
Date: Mon Jan 1 00:00:17 2007 +0000
add eta
commit d21e26b48c6136340dd1212bb45ba0e9debb130c
Author: test <none@none>
Date: Mon Jan 1 00:00:16 2007 +0000
add zeta
commit ee985f124d2f13ee8ad2a346a6d1b0ada8b0d491
Author: name <test@example.com>
Date: Mon Jan 1 00:00:15 2007 +0000
add epsilon
commit d16592507ac83a6a633b90ca255f65e5d024f0bc
Author: name <test@example.com>
Date: Mon Jan 1 00:00:14 2007 +0000
add delta
commit fee30180efc4943fb916de04fcf6a64b638d9325
Author: <test@example.com>
Date: Mon Jan 1 00:00:13 2007 +0000
add gamma
commit 2b9ec6a47b93191986a79eeb771e461c4508c7c4
Author: test ext:(%20%28comment%29) <test@example.com>
Date: Mon Jan 1 00:00:12 2007 +0000
modify beta
commit cffa0e8d8ad5f284c69c898c0f3c1e32d078af8a
Author: test <none@none>
Date: Mon Jan 1 00:00:11 2007 +0000
add beta
commit 7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03
Author: test <test@example.org>
Date: Mon Jan 1 00:00:10 2007 +0000
add alpha
#!/bin/sh
# Fails for some reason, need to investigate
......@@ -3,3 +1,3 @@
# Fails for some reason, need to investigate
# "$TESTDIR/hghave" git || exit 80
# $ "$TESTDIR/hghave" git || exit 80
......@@ -5,4 +3,4 @@
# bail if the user does not have dulwich
python -c 'import dulwich, dulwich.repo' || exit 80
bail if the user does not have dulwich
$ python -c 'import dulwich, dulwich.repo' || exit 80
......@@ -8,4 +6,4 @@
# bail early if the user is already running git-daemon
echo hi | nc localhost 9418 2>/dev/null && exit 80
bail early if the user is already running git-daemon
$ ! (echo hi | nc localhost 9418 2>/dev/null) || exit 80
......@@ -11,6 +9,6 @@
echo "[extensions]" >> $HGRCPATH
echo "hggit=$(echo $(dirname $(dirname $0)))/hggit" >> $HGRCPATH
echo 'hgext.graphlog =' >> $HGRCPATH
echo 'hgext.bookmarks =' >> $HGRCPATH
$ echo "[extensions]" >> $HGRCPATH
$ echo "hggit=$(echo $(dirname $TESTDIR))/hggit" >> $HGRCPATH
$ echo 'hgext.graphlog =' >> $HGRCPATH
$ echo 'hgext.bookmarks =' >> $HGRCPATH
......@@ -16,8 +14,8 @@
cat >> $HGRCPATH <<EOF
[bookmarks]
track.current = True
EOF
$ cat >> $HGRCPATH <<EOF
>
> [bookmarks]
> track.current = True
> EOF
......@@ -22,9 +20,61 @@
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
GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
$ 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
$ GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME"; export GIT_COMMITTER_NAME
$ GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL"; export GIT_COMMITTER_EMAIL
$ GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"; export GIT_COMMITTER_DATE
$ count=10
$ commit()
> {
> GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
> GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
> git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
> count=`expr $count + 1`
> }
$ hgcommit()
> {
> HGDATE="2007-01-01 00:00:$count +0000"
> hg commit -d "$HGDATE" "$@" >/dev/null 2>/dev/null || echo "hg commit error"
> count=`expr $count + 1`
> }
$ mkdir gitrepo
$ cd gitrepo
$ git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
Initialized empty Git repository in gitrepo/.git/
$ echo alpha > alpha
$ git add alpha
$ commit -m "add alpha"
$ git checkout -b not-master
Switched to a new branch 'not-master'
dulwich does not presently support local git repos, workaround
$ cd ..
$ git daemon --base-path="$(pwd)"\
> --listen=localhost\
> --export-all\
> --pid-file="$DAEMON_PIDS" \
> --detach --reuseaddr \
> --enable=receive-pack
$ hg clone git://localhost/gitrepo hgrepo | grep -v '^updating'
importing git objects into hg
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hgrepo
$ hg co master
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo beta > beta
$ hg add beta
$ hgcommit -u "test" -m 'add beta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:cffa0e8d
......@@ -30,16 +80,27 @@
count=10
commit()
{
GIT_AUTHOR_DATE="2007-01-01 00:00:$count +0000"
GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"
git commit "$@" >/dev/null 2>/dev/null || echo "git commit error"
count=`expr $count + 1`
}
hgcommit()
{
HGDATE="2007-01-01 00:00:$count +0000"
hg commit -d "$HGDATE" "$@" >/dev/null 2>/dev/null || echo "hg commit error"
count=`expr $count + 1`
}
$ echo gamma >> beta
$ hgcommit -u "test <test@example.com> (comment)" -m 'modify beta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:2b9ec6a4
$ echo gamma > gamma
$ hg add gamma
$ hgcommit -u "<test@example.com>" -m 'add gamma'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:fee30180
$ echo delta > delta
$ hg add delta
$ hgcommit -u "name<test@example.com>" -m 'add delta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:d1659250
......@@ -45,5 +106,10 @@
mkdir gitrepo
cd gitrepo
git init | python -c "import sys; print sys.stdin.read().replace('$(dirname $(pwd))/', '')"
$ echo epsilon > epsilon
$ hg add epsilon
$ hgcommit -u "name <test@example.com" -m 'add epsilon'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:ee985f12
......@@ -49,6 +115,10 @@
echo alpha > alpha
git add alpha
commit -m "add alpha"
git checkout -b not-master
$ echo zeta > zeta
$ hg add zeta
$ hgcommit -u " test " -m 'add zeta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:d21e26b4
......@@ -54,10 +124,10 @@
# dulwich does not presently support local git repos, workaround
cd ..
git daemon --base-path="$(pwd)"\
--listen=localhost\
--export-all\
--pid-file="$DAEMON_PIDS" \
--detach --reuseaddr \
--enable=receive-pack
$ echo eta > eta
$ hg add eta
$ hgcommit -u "test < test@example.com >" -m 'add eta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:8c878c97
......@@ -63,3 +133,10 @@
hg clone git://localhost/gitrepo hgrepo | grep -v '^updating'
$ echo theta > theta
$ hg add theta
$ hgcommit -u "test >test@example.com>" -m 'add theta'
$ hg push
pushing to git://localhost/gitrepo
exporting hg objects to git
creating and sending data
default::refs/heads/master => GIT:1e03e913
......@@ -65,27 +142,51 @@
cd hgrepo
hg co master
echo beta > beta
hg add beta
hgcommit -u "test" -m 'add beta'
hg push
echo gamma >> beta
hgcommit -u "test <test@example.com> (comment)" -m 'modify beta'
hg push
echo gamma > gamma
hg add gamma
hgcommit -u "<test@example.com>" -m 'add gamma'
hg push
echo delta > delta
hg add delta
hgcommit -u "name<test@example.com>" -m 'add delta'
hg push
echo epsilon > epsilon
hg add epsilon
hgcommit -u "name <test@example.com" -m 'add epsilon'
hg push
$ hg log --graph | egrep -v ': *(not-master|master)'
@ changeset: 8:d3c51ce68cfd
| tag: default/master
| tag: tip
| user: test >test@example.com>
| date: Mon Jan 01 00:00:18 2007 +0000
| summary: add theta
|
o changeset: 7:b90e988091a2
| user: test < test@example.com >
| date: Mon Jan 01 00:00:17 2007 +0000
| summary: add eta
|
o changeset: 6:7ede2f971cae
| user: test
| date: Mon Jan 01 00:00:16 2007 +0000
| summary: add zeta
|
o changeset: 5:1454a94056ec
| user: name <test@example.com
| date: Mon Jan 01 00:00:15 2007 +0000
| summary: add epsilon
|
o changeset: 4:a045fd599678
| user: name<test@example.com>
| date: Mon Jan 01 00:00:14 2007 +0000
| summary: add delta
|
o changeset: 3:8da3ab8b31d0
| user: <test@example.com>
| date: Mon Jan 01 00:00:13 2007 +0000
| summary: add gamma
|
o changeset: 2:92d33c0dd6e1
| user: test <test@example.com> (comment)
| date: Mon Jan 01 00:00:12 2007 +0000
| summary: modify beta
|
o changeset: 1:0564f526fb0f
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: add beta
|
o changeset: 0:3442585be8a6
tag: default/not-master
user: test <test@example.org>
date: Mon Jan 01 00:00:10 2007 +0000
summary: add alpha
......@@ -91,11 +192,56 @@
echo zeta > zeta
hg add zeta
hgcommit -u " test " -m 'add zeta'
hg push
echo eta > eta
hg add eta
hgcommit -u "test < test@example.com >" -m 'add eta'
hg push
$ cd ..
$ hg clone git://localhost/gitrepo hgrepo2 | grep -v '^updating'
importing git objects into hg
8 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hgrepo2
$ hg log --graph | egrep -v ': *(not-master|master)'
@ changeset: 8:efec0270e295
| tag: default/master
| tag: tip
| user: test ?test@example.com <test ?test@example.com>
| date: Mon Jan 01 00:00:18 2007 +0000
| summary: add theta
|
o changeset: 7:8ab87d5066e4
| user: test <test@example.com>
| date: Mon Jan 01 00:00:17 2007 +0000
| summary: add eta
|
o changeset: 6:ff226cc916bd
| user: test
| date: Mon Jan 01 00:00:16 2007 +0000
| summary: add zeta
|
o changeset: 5:5f1557c62c53
| user: name <test@example.com>
| date: Mon Jan 01 00:00:15 2007 +0000
| summary: add epsilon
|
o changeset: 4:fc51727b28fe
| user: name <test@example.com>
| date: Mon Jan 01 00:00:14 2007 +0000
| summary: add delta
|
o changeset: 3:8da3ab8b31d0
| user: <test@example.com>
| date: Mon Jan 01 00:00:13 2007 +0000
| summary: add gamma
|
o changeset: 2:92d33c0dd6e1
| user: test <test@example.com> (comment)
| date: Mon Jan 01 00:00:12 2007 +0000
| summary: modify beta
|
o changeset: 1:0564f526fb0f
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: add beta
|
o changeset: 0:3442585be8a6
tag: default/not-master
user: test <test@example.org>
date: Mon Jan 01 00:00:10 2007 +0000
summary: add alpha
......@@ -101,8 +247,58 @@
echo theta > theta
hg add theta
hgcommit -u "test >test@example.com>" -m 'add theta'
hg push
hg log --graph | egrep -v ': *(not-master|master)'
$ cd ..
$ cd gitrepo
$ git log --pretty=medium master
commit 1e03e913eca571b86ee06d3c1ddd795dde9ca917
Author: test ?test@example.com <test ?test@example.com>
Date: Mon Jan 1 00:00:18 2007 +0000
add theta
commit 8c878c9764e96e67ed9f62b3f317d156bf71bc52
Author: test <test@example.com>
Date: Mon Jan 1 00:00:17 2007 +0000
add eta
commit d21e26b48c6136340dd1212bb45ba0e9debb130c
Author: test <none@none>
Date: Mon Jan 1 00:00:16 2007 +0000
add zeta
commit ee985f124d2f13ee8ad2a346a6d1b0ada8b0d491
Author: name <test@example.com>
Date: Mon Jan 1 00:00:15 2007 +0000
add epsilon
commit d16592507ac83a6a633b90ca255f65e5d024f0bc
Author: name <test@example.com>
Date: Mon Jan 1 00:00:14 2007 +0000
add delta
commit fee30180efc4943fb916de04fcf6a64b638d9325
Author: <test@example.com>
Date: Mon Jan 1 00:00:13 2007 +0000
add gamma
commit 2b9ec6a47b93191986a79eeb771e461c4508c7c4
Author: test ext:(%20%28comment%29) <test@example.com>
Date: Mon Jan 1 00:00:12 2007 +0000
modify beta
commit cffa0e8d8ad5f284c69c898c0f3c1e32d078af8a
Author: test <none@none>
Date: Mon Jan 1 00:00:11 2007 +0000
add beta
commit 7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03
Author: test <test@example.org>
Date: Mon Jan 1 00:00:10 2007 +0000
add alpha
......@@ -108,11 +304,2 @@
cd ..
hg clone git://localhost/gitrepo hgrepo2 | grep -v '^updating'
cd hgrepo2
hg log --graph | egrep -v ': *(not-master|master)'
cd ..
cd gitrepo
git log --pretty=medium master
cd ..
$ cd ..
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment