sapling/eden/scm/tests/test-hggit-octopus.t

166 lines
4.6 KiB
Perl
Raw Normal View History

Load commonly used test logic
$ . "$TESTDIR/hggit/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ cd gitrepo
2012-09-10 08:27:41 +04:00
$ echo alpha > alpha
$ git add alpha
$ fn_git_commit -m 'add alpha'
2012-09-10 08:27:41 +04:00
$ git checkout -b branch1
Switched to a new branch 'branch1'
2012-09-10 08:27:41 +04:00
$ echo beta > beta
$ git add beta
$ fn_git_commit -m 'add beta'
2012-09-10 08:27:41 +04:00
$ git checkout -b branch2 master
Switched to a new branch 'branch2'
2012-09-10 08:27:41 +04:00
$ echo gamma > gamma
$ git add gamma
$ fn_git_commit -m 'add gamma'
2012-09-10 08:27:41 +04:00
$ git checkout -b branch3 master
Switched to a new branch 'branch3'
$ echo epsilon > epsilon
$ git add epsilon
$ fn_git_commit -m 'add epsilon'
$ git checkout -b branch4 master
Switched to a new branch 'branch4'
$ echo zeta > zeta
$ git add zeta
$ fn_git_commit -m 'add zeta'
$ git checkout master
Switched to branch 'master'
2012-09-10 08:27:41 +04:00
$ echo delta > delta
$ git add delta
$ fn_git_commit -m 'add delta'
2012-09-10 08:27:41 +04:00
$ git merge branch1 branch2
2012-09-10 08:27:41 +04:00
Trying simple merge with branch1
Trying simple merge with branch2
Merge made by the 'octopus' strategy.
2012-09-10 08:27:41 +04:00
beta | 1 +
gamma | 1 +
2 files changed, 2 insertions(+)
create mode 100644 beta
create mode 100644 gamma
$ git merge branch3 branch4
Trying simple merge with branch3
Trying simple merge with branch4
Merge made by the 'octopus' strategy.
epsilon | 1 +
zeta | 1 +
2 files changed, 2 insertions(+)
create mode 100644 epsilon
create mode 100644 zeta
2012-09-10 08:27:41 +04:00
$ cd ..
$ git init --bare gitrepo2
Initialized empty Git repository in $TESTTMP/gitrepo2/
2012-09-10 08:27:41 +04:00
$ hg clone gitrepo hgrepo | grep -v '^updating'
2012-09-10 08:27:41 +04:00
importing git objects into hg
6 files updated, 0 files merged, 0 files removed, 0 files unresolved
2012-09-10 08:27:41 +04:00
$ cd hgrepo
$ hg log --graph --style compact
@ 9[default/master][master]:7,8 49ab838a9c6d 2007-01-01 00:00 +0000 test
|\ Merge branches 'branch3' and 'branch4'
2012-09-10 08:27:41 +04:00
| |
| o 8:3,4 772137582d44 2007-01-01 00:00 +0000 test
| |\ Merge branches 'branch3' and 'branch4'
2012-09-10 08:27:41 +04:00
| | |
o | | 7:5,6 605318eb3cbf 2007-01-01 00:00 +0000 test
|\ \ \ Merge branches 'branch1' and 'branch2'
| | | |
| o | | 6:1,2 c37d2773086b 2007-01-01 00:00 +0000 test
| |\ \ \ Merge branches 'branch1' and 'branch2'
| | | | |
o | | | | 5:0 e70767a0294a 2007-01-01 00:00 +0000 test
| | | | | add delta
| | | | |
+-------o 4[default/branch4][branch4]:0 8b150650bbba 2007-01-01 00:00 +0000 test
| | | | add zeta
| | | |
+-----o 3[default/branch3][branch3]:0 b869fdf3e852 2007-01-01 00:00 +0000 test
| | | add epsilon
2012-09-10 08:27:41 +04:00
| | |
+---o 2[default/branch2][branch2]:0 328de8a94600 2007-01-01 00:00 +0000 test
2012-09-10 08:27:41 +04:00
| | add gamma
| |
| o 1[default/branch1][branch1] 3bb02b6794dd 2007-01-01 00:00 +0000 test
2012-09-10 08:27:41 +04:00
|/ add beta
|
o 0 69982ec78c6d 2007-01-01 00:00 +0000 test
2012-09-10 08:27:41 +04:00
add alpha
$ hg gverify -r 9
verifying rev 49ab838a9c6d against git commit b32ff845df61df998206b630e4370a44f9b36845
$ hg gverify -r 8
abort: no git commit found for rev 772137582d44
(if this is an octopus merge, verify against the last rev)
[255]
2012-09-10 08:27:41 +04:00
$ hg gclear
clearing out the git cache data
$ hg push ../gitrepo2
pushing to ../gitrepo2
searching for changes
adding objects
added 8 commits with 8 trees and 6 blobs
$ cd ..
2012-09-10 08:27:41 +04:00
$ git --git-dir=gitrepo2 log --pretty=medium
commit 2359e57d541911d60d80549ad41462b220d10c65
Merge: f37a7b7 7ceac1d 692cf8a
2012-09-10 08:27:41 +04:00
Author: test <test@example.org>
Date: Mon Jan 1 00:00:15 2007 +0000
Merge branches 'branch3' and 'branch4'
commit f37a7b7b4969612fd5ab85b6d31d6465c25fef0b
Merge: 47293d4 dbed4f6 3ab4bf1
Author: test <test@example.org>
Date: Mon Jan 1 00:00:15 2007 +0000
2012-09-10 08:27:41 +04:00
Merge branches 'branch1' and 'branch2'
commit 47293d46a21e55863c4a47f168731a2b9f95712b
2012-09-10 08:27:41 +04:00
Author: test <test@example.org>
Date: Mon Jan 1 00:00:15 2007 +0000
2012-09-10 08:27:41 +04:00
add delta
commit 692cf8ab35262a87694759a7668700632ca52c47
Author: test <test@example.org>
Date: Mon Jan 1 00:00:14 2007 +0000
add zeta
commit 7ceac1da981d4d67a88c662cc1c27e5e40c95884
Author: test <test@example.org>
Date: Mon Jan 1 00:00:13 2007 +0000
add epsilon
commit 3ab4bf1785d6dbdb82467bf09e6aa1450312968d
2012-09-10 08:27:41 +04:00
Author: test <test@example.org>
Date: Mon Jan 1 00:00:12 2007 +0000
add gamma
commit dbed4f6a8ff04d4d1f0a5ce79f9a07cf0f461d7f
2012-09-10 08:27:41 +04:00
Author: test <test@example.org>
Date: Mon Jan 1 00:00:11 2007 +0000
add beta
commit 205598a42833e532ad20d80414b8e3b85a65936e
2012-09-10 08:27:41 +04:00
Author: test <test@example.org>
Date: Mon Jan 1 00:00:10 2007 +0000
add alpha