Newer
Older
Load commonly used test logic
$ . "$TESTDIR/testutil"
$ git init gitrepo
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
$ cd gitrepo
$ echo alpha > alpha
$ git add alpha
$ fn_git_commit -m "add alpha"
$ git branch alpha
$ git show-ref
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
$ hg clone gitrepo hgrepo
Dan Villiom Podlaski Christiansen
committed
updating to bookmark master (hg57 !)
updating to branch default (no-hg57 !)
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd hgrepo
$ hg book
alpha 0:ff7a2f2d8d70
* master 0:ff7a2f2d8d70
$ fn_hg_commit -m 'add beta'
$ fn_hg_commit -m 'add gamma'
$ hg outgoing | grep -v 'searching for changes'
comparing with $TESTTMP/gitrepo
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
changeset: 2:953796e1cfd8
tag: tip
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ hg outgoing -r beta
comparing with $TESTTMP/gitrepo
searching for changes
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
$ hg outgoing -r master
comparing with $TESTTMP/gitrepo
searching for changes
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
changeset: 2:953796e1cfd8
tag: tip
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ cd ..
Check state of refs after outgoing
$ git show-ref
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
$ git checkout master 2>&1 | sed s/\'/\"/g
Already on "master"
$ echo delta > delta
$ git add delta
$ fn_git_commit -m "add delta"
this will fail # maybe we should try to make it work
comparing with $TESTTMP/gitrepo
abort: branch 'refs/heads/master' changed on the server, please pull and merge before pushing
$ hg pull
(run 'hg heads' to see heads, 'hg merge' to merge)
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
$ hg log --graph
o changeset: 3:25eed24f5e8f
| tag: default/master
| tag: tip
| parent: 0:ff7a2f2d8d70
| user: test <test@example.org>
| date: Mon Jan 01 00:00:13 2007 +0000
| summary: add delta
|
| @ changeset: 2:953796e1cfd8
| | bookmark: master
| | user: test
| | date: Mon Jan 01 00:00:12 2007 +0000
| | summary: add gamma
| |
| o changeset: 1:47580592d3d6
|/ bookmark: beta
| user: test
| date: Mon Jan 01 00:00:11 2007 +0000
| summary: add beta
|
o changeset: 0:ff7a2f2d8d70
bookmark: alpha
tag: default/alpha
user: test <test@example.org>
date: Mon Jan 01 00:00:10 2007 +0000
summary: add alpha
$ hg outgoing
comparing with $TESTTMP/gitrepo
searching for changes
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
changeset: 2:953796e1cfd8
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ hg outgoing -r beta
comparing with $TESTTMP/gitrepo
searching for changes
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
$ hg outgoing -r master
comparing with $TESTTMP/gitrepo
searching for changes
changeset: 1:47580592d3d6
user: test
date: Mon Jan 01 00:00:11 2007 +0000
summary: add beta
changeset: 2:953796e1cfd8
user: test
date: Mon Jan 01 00:00:12 2007 +0000
summary: add gamma
$ cd ..