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-14 02:48:46 +04:00
|
|
|
$ echo alpha > alpha
|
|
|
|
$ git add alpha
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_git_commit -m "add alpha"
|
2012-09-28 06:32:01 +04:00
|
|
|
$ git branch alpha
|
|
|
|
$ git show-ref
|
|
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
|
|
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
|
2012-09-14 02:48:46 +04:00
|
|
|
|
|
|
|
$ cd ..
|
2012-09-14 04:49:45 +04:00
|
|
|
$ hg clone gitrepo hgrepo | grep -v '^updating'
|
2012-09-14 02:48:46 +04:00
|
|
|
importing git objects into hg
|
|
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
|
|
|
|
$ cd hgrepo
|
2012-09-28 06:32:01 +04:00
|
|
|
$ hg update -q master
|
2012-09-14 02:48:46 +04:00
|
|
|
$ echo beta > beta
|
|
|
|
$ hg add beta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -m 'add beta'
|
2012-09-14 02:48:46 +04:00
|
|
|
|
|
|
|
|
|
|
|
$ echo gamma > gamma
|
|
|
|
$ hg add gamma
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_hg_commit -m 'add gamma'
|
2012-09-14 02:48:46 +04:00
|
|
|
|
|
|
|
$ hg book -r 1 beta
|
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 2:49480a0fbf45
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: master
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
summary: add gamma
|
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing -r beta | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing -r master | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 2:49480a0fbf45
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: master
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
summary: add gamma
|
|
|
|
|
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
2012-11-04 03:14:17 +04:00
|
|
|
some more work on master from git
|
2012-09-14 02:48:46 +04:00
|
|
|
$ cd gitrepo
|
|
|
|
|
2012-09-28 06:32:01 +04:00
|
|
|
Check state of refs after outgoing
|
|
|
|
$ git show-ref
|
|
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
|
|
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
|
|
|
|
|
2018-01-09 16:53:20 +03:00
|
|
|
$ git checkout master
|
|
|
|
Already on 'master'
|
2012-09-14 02:48:46 +04:00
|
|
|
$ echo delta > delta
|
|
|
|
$ git add delta
|
2012-10-31 06:59:20 +04:00
|
|
|
$ fn_git_commit -m "add delta"
|
2012-09-14 02:48:46 +04:00
|
|
|
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
$ cd hgrepo
|
2012-11-04 03:14:17 +04:00
|
|
|
this will fail # maybe we should try to make it work
|
2012-09-14 02:48:46 +04:00
|
|
|
$ hg outgoing
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2013-12-16 00:25:31 +04:00
|
|
|
abort: branch 'refs/heads/master' changed on the server, please pull and merge before pushing
|
2012-09-14 02:48:46 +04:00
|
|
|
[255]
|
2012-11-04 03:14:17 +04:00
|
|
|
let's pull and try again
|
2012-10-26 04:49:08 +04:00
|
|
|
$ hg pull 2>&1 | grep -v 'divergent bookmark'
|
2012-09-14 04:49:45 +04:00
|
|
|
pulling from */gitrepo (glob)
|
2012-09-14 02:48:46 +04:00
|
|
|
importing git objects into hg
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 2:49480a0fbf45
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: master
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
summary: add gamma
|
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing -r beta | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2015-03-12 20:29:58 +03:00
|
|
|
$ hg outgoing -r master | grep -v 'searching for changes'
|
2012-09-14 04:49:45 +04:00
|
|
|
comparing with */gitrepo (glob)
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 1:574e2d660a7d
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: beta
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
|
|
summary: add beta
|
|
|
|
|
2018-12-06 23:00:57 +03:00
|
|
|
changeset: 2:49480a0fbf45
|
2015-03-12 20:29:58 +03:00
|
|
|
bookmark: master
|
2012-09-14 02:48:46 +04:00
|
|
|
user: test
|
|
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
|
|
summary: add gamma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$ cd ..
|