mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
1ca5f6bfae
Summary: Git client was updated and it started outputting a hint that breaks our tests. It has no meaning in tests so just quiet it. ``` ➜ fbcode git init hint: Using 'master' as the name for the initial branch. This default branch name hint: is subject to change. To configure the initial branch name to use in all hint: of your new repositories, which will suppress this warning, call: hint: hint: git config --global init.defaultBranch <name> hint: hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and hint: 'development'. The just-created branch can be renamed via this command: hint: hint: git branch -m <name> Initialized empty Git repository in /data/users/mzr/fbsource/fbcode/.git/ ``` Reviewed By: StanislavGlebik Differential Revision: D27232853 fbshipit-source-id: 683ebebb36049adb758e7c26f843f12159a45301
136 lines
3.4 KiB
Perl
136 lines
3.4 KiB
Perl
Load commonly used test logic
|
|
$ . "$TESTDIR/hggit/testutil"
|
|
|
|
$ git init -q gitrepo
|
|
$ 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
|
|
|
|
$ cd ..
|
|
$ hg clone gitrepo hgrepo | grep -v '^updating'
|
|
importing git objects into hg
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ cd hgrepo
|
|
$ hg update -q master
|
|
$ echo beta > beta
|
|
$ hg add beta
|
|
$ fn_hg_commit -m 'add beta'
|
|
|
|
|
|
$ echo gamma > gamma
|
|
$ hg add gamma
|
|
$ fn_hg_commit -m 'add gamma'
|
|
|
|
$ hg book -r 574e2d660a7d7bbaf97251f694c8c8327f0db957 beta
|
|
|
|
$ hg outgoing | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
commit: 49480a0fbf45
|
|
bookmark: master
|
|
user: test
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
summary: add gamma
|
|
|
|
$ hg outgoing -r beta | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
$ hg outgoing -r master | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
commit: 49480a0fbf45
|
|
bookmark: master
|
|
user: test
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
summary: add gamma
|
|
|
|
|
|
$ cd ..
|
|
|
|
some more work on master from git
|
|
$ cd gitrepo
|
|
|
|
Check state of refs after outgoing
|
|
$ git show-ref
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/alpha
|
|
7eeab2ea75ec1ac0ff3d500b5b6f8a3447dd7c03 refs/heads/master
|
|
|
|
$ git checkout master
|
|
Already on 'master'
|
|
$ echo delta > delta
|
|
$ git add delta
|
|
$ fn_git_commit -m "add delta"
|
|
|
|
$ cd ..
|
|
|
|
$ cd hgrepo
|
|
this will fail # maybe we should try to make it work
|
|
$ hg outgoing
|
|
comparing with */gitrepo (glob)
|
|
abort: branch 'refs/heads/master' changed on the server, please pull and merge before pushing
|
|
[255]
|
|
let's pull and try again
|
|
$ hg pull 2>&1 | grep -v 'divergent bookmark'
|
|
pulling from */gitrepo (glob)
|
|
importing git objects into hg
|
|
$ hg outgoing | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
commit: 49480a0fbf45
|
|
bookmark: master
|
|
user: test
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
summary: add gamma
|
|
|
|
$ hg outgoing -r beta | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
$ hg outgoing -r master | grep -v 'searching for changes'
|
|
comparing with */gitrepo (glob)
|
|
commit: 574e2d660a7d
|
|
bookmark: beta
|
|
user: test
|
|
date: Mon Jan 01 00:00:11 2007 +0000
|
|
summary: add beta
|
|
|
|
commit: 49480a0fbf45
|
|
bookmark: master
|
|
user: test
|
|
date: Mon Jan 01 00:00:12 2007 +0000
|
|
summary: add gamma
|
|
|
|
|
|
|
|
$ cd ..
|