mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
e41aded84e
Since Mercurial is commit-oriented, the 'no changes found' message really should rely on what new commits are in the repo, not on new heads. This also makes an upcoming patch much simpler. Since everything around this code is completely broken anyway, writing a test for this that doesn't trigger other bugs is close to impossible. An upcoming patch will include tests. The test output change is for an empty clone -- the output is precisely how vanilla Mercurial treats an empty clone.
60 lines
1.7 KiB
Perl
60 lines
1.7 KiB
Perl
Load commonly used test logic
|
|
$ . "$TESTDIR/testutil"
|
|
|
|
$ git init gitrepo
|
|
Initialized empty Git repository in $TESTTMP/gitrepo/.git/
|
|
$ cd gitrepo
|
|
$ echo alpha > alpha
|
|
$ git add alpha
|
|
$ fn_git_commit -m 'add alpha'
|
|
|
|
$ git tag alpha
|
|
|
|
$ git checkout -b beta 2>&1 | sed s/\'/\"/g
|
|
Switched to a new branch "beta"
|
|
$ echo beta > beta
|
|
$ git add beta
|
|
$ fn_git_commit -m 'add beta'
|
|
|
|
|
|
$ cd ..
|
|
clone a tag
|
|
$ hg clone -r alpha gitrepo hgrepo-a | grep -v '^updating'
|
|
importing git objects into hg
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ hg -R hgrepo-a log --graph | egrep -v ': *(beta|master)'
|
|
@ 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
|
|
|
|
clone a branch
|
|
$ hg clone -r beta gitrepo hgrepo-b | grep -v '^updating'
|
|
importing git objects into hg
|
|
2 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ hg -R hgrepo-b log --graph | egrep -v ': *(beta|master)'
|
|
@ 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
|
|
|
|
|
|
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
|