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
73 lines
1.9 KiB
Perl
73 lines
1.9 KiB
Perl
Load commonly used test logic
|
|
$ . "$TESTDIR/hggit/testutil"
|
|
|
|
$ hg init hgrepo1
|
|
$ cd hgrepo1
|
|
$ echo A > afile
|
|
$ hg add afile
|
|
$ hg ci -m "origin"
|
|
|
|
$ echo B > afile
|
|
$ hg ci -m "A->B"
|
|
|
|
$ hg up -r'desc(origin)'
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ echo C > afile
|
|
$ hg ci -m "A->C"
|
|
|
|
$ hg merge -r7205e83b5a3fb01334c76fef35a69c912f5b2ba3
|
|
merging afile
|
|
warning: 1 conflicts while merging afile! (edit, then use 'hg resolve --mark')
|
|
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
|
|
use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
|
|
[1]
|
|
resolve using first parent
|
|
$ echo C > afile
|
|
$ hg resolve -m afile | egrep -v 'no more unresolved files' || true
|
|
$ hg ci -m "merge to C"
|
|
|
|
$ hg log --graph --style compact
|
|
@ 6c53bc0f062f 1970-01-01 00:00 +0000 test
|
|
├─╮ merge to C
|
|
│ │
|
|
│ o ea82b67264a1 1970-01-01 00:00 +0000 test
|
|
│ │ A->C
|
|
│ │
|
|
o │ 7205e83b5a3f 1970-01-01 00:00 +0000 test
|
|
├─╯ A->B
|
|
│
|
|
o 5d1a6b64f9d0 1970-01-01 00:00 +0000 test
|
|
origin
|
|
|
|
|
|
$ cd ..
|
|
|
|
$ git init -q --bare gitrepo
|
|
|
|
$ cd hgrepo1
|
|
$ hg bookmark -r tip master
|
|
$ hg push -r master ../gitrepo
|
|
pushing to ../gitrepo
|
|
searching for changes
|
|
adding objects
|
|
added 4 commits with 3 trees and 3 blobs
|
|
$ cd ..
|
|
|
|
$ hg clone gitrepo hgrepo2 | grep -v '^updating'
|
|
importing git objects into hg
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
expect the same revision ids as above
|
|
$ hg -R hgrepo2 log --graph --style compact
|
|
@ [master] b70d5f2ec3c4 1970-01-01 00:00 +0000 test
|
|
├─╮ merge to C
|
|
│ │
|
|
│ o 47fc555571b8 1970-01-01 00:00 +0000 test
|
|
│ │ A->B
|
|
│ │
|
|
o │ 8ec5b459b86e 1970-01-01 00:00 +0000 test
|
|
├─╯ A->C
|
|
│
|
|
o fd5eb788c3a1 1970-01-01 00:00 +0000 test
|
|
origin
|
|
|