2012-10-31 04:03:26 +04:00
|
|
|
Load commonly used test logic
|
2018-01-09 17:08:01 +03:00
|
|
|
$ . "$TESTDIR/hggit/testutil"
|
2012-10-31 04:03:26 +04:00
|
|
|
|
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:16 +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:16 +04:00
|
|
|
$ git checkout -b not-master
|
|
|
|
Switched to a new branch 'not-master'
|
|
|
|
|
|
|
|
$ cd ..
|
2012-09-14 04:49:45 +04:00
|
|
|
$ hg clone gitrepo hgrepo | grep -v '^updating'
|
2012-09-10 08:27:16 +04:00
|
|
|
importing git objects into hg
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
|
|
|
$ cd hgrepo
|
2016-01-09 01:02:20 +03:00
|
|
|
$ hg book master
|
2012-09-10 08:27:16 +04:00
|
|
|
$ echo beta > beta
|
|
|
|
$ hg add beta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "test" -m 'add beta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo gamma >> beta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "test <test@example.com> (comment)" -m 'modify beta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo gamma > gamma
|
|
|
|
$ hg add gamma
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "<test@example.com>" -m 'add gamma'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo delta > delta
|
|
|
|
$ hg add delta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "name<test@example.com>" -m 'add delta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo epsilon > epsilon
|
|
|
|
$ hg add epsilon
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "name <test@example.com" -m 'add epsilon'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo zeta > zeta
|
|
|
|
$ hg add zeta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u " test " -m 'add zeta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo eta > eta
|
|
|
|
$ hg add eta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "test < test@example.com >" -m 'add eta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
|
|
|
$ echo theta > theta
|
|
|
|
$ hg add theta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -u "test >test@example.com>" -m 'add theta'
|
2012-09-10 08:27:16 +04:00
|
|
|
$ hg push
|
2012-09-14 04:49:45 +04:00
|
|
|
pushing to $TESTTMP/gitrepo
|
2012-10-08 04:11:27 +04:00
|
|
|
searching for changes
|
2013-01-06 10:46:57 +04:00
|
|
|
adding objects
|
2013-12-13 21:41:41 +04:00
|
|
|
added 1 commits with 1 trees and 1 blobs
|
2013-01-06 11:31:37 +04:00
|
|
|
updating reference refs/heads/master
|
2012-09-10 08:27:16 +04:00
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg log --graph
|
2014-12-03 01:17:09 +03:00
|
|
|
@ changeset: 8:c5d1976ab12c
|
2015-03-12 20:29:58 +03:00
|
|
|
| bookmark: master
|
2012-09-10 08:27:16 +04:00
|
|
|
| tag: default/master
|
|
|
|
| tag: tip
|
|
|
|
| user: test >test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:18 2007 +0000
|
|
|
|
| summary: add theta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 7:0e2fb4d21667
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test < test@example.com >
|
|
|
|
| date: Mon Jan 01 00:00:17 2007 +0000
|
|
|
|
| summary: add eta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 6:faa3aae96199
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test
|
|
|
|
| date: Mon Jan 01 00:00:16 2007 +0000
|
|
|
|
| summary: add zeta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 5:2cf6ad5a1afc
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: name <test@example.com
|
|
|
|
| date: Mon Jan 01 00:00:15 2007 +0000
|
|
|
|
| summary: add epsilon
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 4:3131b2a71396
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: name<test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:14 2007 +0000
|
|
|
|
| summary: add delta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 3:6b854d65d0d6
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: <test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:13 2007 +0000
|
|
|
|
| summary: add gamma
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 2:46303c652e79
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test <test@example.com> (comment)
|
|
|
|
| date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
| summary: modify beta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 1:47580592d3d6
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test
|
|
|
|
| date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
| summary: add beta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 0:ff7a2f2d8d70
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: not-master
|
2012-09-10 08:27:16 +04:00
|
|
|
tag: default/not-master
|
|
|
|
user: test <test@example.org>
|
|
|
|
date: Mon Jan 01 00:00:10 2007 +0000
|
|
|
|
summary: add alpha
|
|
|
|
|
|
|
|
|
|
|
|
$ cd ..
|
2012-09-14 04:49:45 +04:00
|
|
|
$ hg clone gitrepo hgrepo2 | grep -v '^updating'
|
2012-09-10 08:27:16 +04:00
|
|
|
importing git objects into hg
|
|
|
|
8 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg -R hgrepo2 log --graph
|
2014-12-03 01:17:09 +03:00
|
|
|
@ changeset: 8:1fbf3aa91221
|
2015-03-12 20:29:58 +03:00
|
|
|
| bookmark: master
|
2012-09-10 08:27:16 +04:00
|
|
|
| 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
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 7:20310508f06d
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test <test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:17 2007 +0000
|
|
|
|
| summary: add eta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 6:e3d81af8a8c1
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test
|
|
|
|
| date: Mon Jan 01 00:00:16 2007 +0000
|
|
|
|
| summary: add zeta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 5:78f609fd208f
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: name <test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:15 2007 +0000
|
|
|
|
| summary: add epsilon
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 4:42fa61d57718
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: name <test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:14 2007 +0000
|
|
|
|
| summary: add delta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 3:6b854d65d0d6
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: <test@example.com>
|
|
|
|
| date: Mon Jan 01 00:00:13 2007 +0000
|
|
|
|
| summary: add gamma
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 2:46303c652e79
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test <test@example.com> (comment)
|
|
|
|
| date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
| summary: modify beta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 1:47580592d3d6
|
2012-09-10 08:27:16 +04:00
|
|
|
| user: test
|
|
|
|
| date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
| summary: add beta
|
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
o changeset: 0:ff7a2f2d8d70
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: not-master
|
2012-09-10 08:27:16 +04:00
|
|
|
tag: default/not-master
|
|
|
|
user: test <test@example.org>
|
|
|
|
date: Mon Jan 01 00:00:10 2007 +0000
|
|
|
|
summary: add alpha
|
|
|
|
|
2012-11-04 03:12:08 +04:00
|
|
|
$ git --git-dir=gitrepo/.git log --pretty=medium master
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 2fe60ba69727981e6ede78be70354c3a9e30e21d
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: test ?test@example.com <test ?test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:18 2007 +0000
|
|
|
|
|
|
|
|
add theta
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 9f2f7cafdbf2e467928db98de8275141001d3081
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: test <test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:17 2007 +0000
|
|
|
|
|
|
|
|
add eta
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 172a6f8d8064d73dff7013e395a9fe3cfc3ff807
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: test <none@none>
|
|
|
|
Date: Mon Jan 1 00:00:16 2007 +0000
|
|
|
|
|
|
|
|
add zeta
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 71badb8e343a7da391a9b5d98909fbd2ca7d78f2
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: name <test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:15 2007 +0000
|
|
|
|
|
|
|
|
add epsilon
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 9a9ae7b7f310d4a1a3e732a747ca26f06934f8d8
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: name <test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:14 2007 +0000
|
|
|
|
|
|
|
|
add delta
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit e4149a32e81e380193f59aa8773349201b8ed7f7
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: <test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:13 2007 +0000
|
|
|
|
|
|
|
|
add gamma
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit fae95aef5889a80103c2fbd5d14ff6eb8c9daf93
|
2012-09-10 08:27:16 +04:00
|
|
|
Author: test ext:(%20%28comment%29) <test@example.com>
|
|
|
|
Date: Mon Jan 1 00:00:12 2007 +0000
|
|
|
|
|
|
|
|
modify beta
|
|
|
|
|
2014-12-03 01:17:09 +03:00
|
|
|
commit 0f378ab6c2c6b5514bd873d3faf8ac4b8095b001
|
2012-09-10 08:27:16 +04:00
|
|
|
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
|