mirror of
https://github.com/facebook/sapling.git
synced 2025-01-06 21:48:36 +03:00
75a8173a10
Summary: Add `#chg-compatible` to 572 tests that seem to pass with chg enabled. This should make them run faster. Reviewed By: xavierd Differential Revision: D18870507 fbshipit-source-id: fe895e733efffc9286cd3d17c7a156c803124395
70 lines
2.8 KiB
Perl
70 lines
2.8 KiB
Perl
#chg-compatible
|
|
|
|
$ . "$TESTDIR/hgsql/library.sh"
|
|
|
|
Do some initial setup
|
|
$ cat >> $HGRCPATH <<CONFIG
|
|
> [ui]
|
|
> ssh = python "$RUNTESTDIR/dummyssh"
|
|
> username = nobody <no.reply@fb.com>
|
|
> [extensions]
|
|
> checkserverbookmark=
|
|
> smartlog=
|
|
> CONFIG
|
|
|
|
Setup helpers
|
|
$ log() {
|
|
> hg sl -T "{desc} [{phase};rev={rev};{node}] {bookmarks}" "$@"
|
|
> }
|
|
|
|
Setup a server repo
|
|
$ hg init server
|
|
$ cd server
|
|
$ echo a > a && hg ci -qAm a && hg book -i book1
|
|
$ echo b > b && hg ci -qAm b
|
|
$ echo c > c && hg ci -qAm c && hg book -i book2
|
|
$ log -r "all()"
|
|
@ c [draft;rev=2;177f92b773850b59254aa5e923436f921b55483b] book2
|
|
|
|
|
o b [draft;rev=1;d2ae7f538514cd87c17547b0de4cea71fe1af9fb]
|
|
|
|
|
o a [draft;rev=0;cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b] book1
|
|
|
|
|
|
Verify bookmark locations while not being in a repo
|
|
$ cd $TESTTMP
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book1 --hash cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b --deleted
|
|
abort: can't use `--hash` and `--deleted`
|
|
[255]
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book1
|
|
abort: either `--hash` or `--deleted` should be used
|
|
[255]
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book1 --hash cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
|
|
creating a peer took: * (glob)
|
|
running lookup took: * (glob)
|
|
hg server has expected bookmark location. book: book1, hash: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book2 --hash cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
|
|
creating a peer took: * (glob)
|
|
running lookup took: * (glob)
|
|
hg server does not have an expected bookmark location. book: book2, server: 177f92b773850b59254aa5e923436f921b55483b; expected cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b
|
|
[1]
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book1 --hash d2ae7f538514cd87c17547b0de4cea71fe1af9fb
|
|
creating a peer took: * (glob)
|
|
running lookup took: * (glob)
|
|
hg server does not have an expected bookmark location. book: book1, server: cb9a9f314b8b07ba71012fcdbc544b5a4d82ff5b; expected d2ae7f538514cd87c17547b0de4cea71fe1af9fb
|
|
[1]
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name nope --hash d2ae7f538514cd87c17547b0de4cea71fe1af9fb
|
|
creating a peer took: * (glob)
|
|
running lookup took: * (glob)
|
|
abort: unknown revision 'nope'!
|
|
[255]
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name nope --deleted
|
|
creating a peer took: * (glob)
|
|
running listkeys took: * (glob)
|
|
hg server expectedly does not have a bookmark: nope
|
|
$ hg checkserverbookmark --path ssh://user@dummy/server --name book1 --deleted
|
|
creating a peer took: * (glob)
|
|
running listkeys took: * (glob)
|
|
hg server has bookmark, which is expected to have been deleted: book1
|
|
[1]
|