2012-10-31 04:03:26 +04:00
|
|
|
Load commonly used test logic
|
|
|
|
$ . "$TESTDIR/testutil"
|
|
|
|
|
2012-10-31 08:01:03 +04:00
|
|
|
$ git init gitrepo
|
2012-09-14 04:49:42 +04:00
|
|
|
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
|
2012-10-31 08:01:03 +04:00
|
|
|
$ cd gitrepo
|
2012-09-10 08:27:43 +04:00
|
|
|
$ echo alpha > alpha
|
|
|
|
$ git add alpha
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_git_commit -m 'add alpha'
|
2012-09-10 08:27:43 +04:00
|
|
|
|
|
|
|
$ git tag alpha
|
|
|
|
|
|
|
|
$ git checkout -b beta 2>&1 | sed s/\'/\"/g
|
|
|
|
Switched to a new branch "beta"
|
|
|
|
$ echo beta > beta
|
|
|
|
$ git add beta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_git_commit -m 'add beta'
|
2012-09-10 08:27:43 +04:00
|
|
|
|
|
|
|
|
|
|
|
$ cd ..
|
2012-11-04 03:14:17 +04:00
|
|
|
clone a tag
|
2012-09-14 04:49:45 +04:00
|
|
|
$ hg clone -r alpha gitrepo hgrepo-a | grep -v '^updating'
|
2012-09-10 08:27:43 +04:00
|
|
|
importing git objects into hg
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2012-11-04 03:12:08 +04:00
|
|
|
$ hg -R hgrepo-a log --graph | egrep -v ': *(beta|master)'
|
2012-09-10 08:27:43 +04:00
|
|
|
@ changeset: 0:3442585be8a6
|
|
|
|
tag: alpha
|
|
|
|
tag: default/master
|
|
|
|
tag: tip
|
|
|
|
user: test <test@example.org>
|
|
|
|
date: Mon Jan 01 00:00:10 2007 +0000
|
|
|
|
summary: add alpha
|
|
|
|
|
2012-11-04 03:14:17 +04:00
|
|
|
clone a branch
|
2012-09-14 04:49:45 +04:00
|
|
|
$ hg clone -r beta gitrepo hgrepo-b | grep -v '^updating'
|
2012-09-10 08:27:43 +04:00
|
|
|
importing git objects into hg
|
|
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2012-11-04 03:12:08 +04:00
|
|
|
$ hg -R hgrepo-b log --graph | egrep -v ': *(beta|master)'
|
2012-09-10 08:27:43 +04:00
|
|
|
@ changeset: 1:7bcd915dc873
|
|
|
|
| tag: default/beta
|
|
|
|
| tag: tip
|
|
|
|
| user: test <test@example.org>
|
|
|
|
| date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
| summary: add beta
|
|
|
|
|
|
|
|
|
o changeset: 0:3442585be8a6
|
|
|
|
tag: alpha
|
|
|
|
tag: default/master
|
|
|
|
user: test <test@example.org>
|
|
|
|
date: Mon Jan 01 00:00:10 2007 +0000
|
|
|
|
summary: add alpha
|
|
|
|
|
2013-12-04 01:55:17 +04:00
|
|
|
|
|
|
|
clone empty repo
|
|
|
|
$ git init empty
|
|
|
|
Initialized empty Git repository in $TESTTMP/empty/.git/
|
|
|
|
$ hg clone empty emptyhg
|
|
|
|
updating to branch default
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|