sapling/tests/integration/test-infinitepush-bookmarks-disabled.t
Kostia Balytskyi 7afc953929 mononoke: allow tests to work with multiple mononoke repos
Reviewed By: farnz

Differential Revision: D17499277

fbshipit-source-id: 99c3e624cea855a6984b0a3c1d991d16e13c64a3
2019-09-23 07:16:15 -07:00

87 lines
2.0 KiB
Perl

$ . "${TEST_FIXTURES}/library.sh"
setup configuration
$ INFINITEPUSH_ALLOW_WRITES=true setup_common_config
$ cd $TESTTMP
setup common configuration for these tests
$ cat >> $HGRCPATH <<EOF
> [extensions]
> amend=
> infinitepush=
> commitcloud=
> EOF
setup repo
$ hginit_treemanifest repo-hg
$ cd repo-hg
$ touch a && hg addremove && hg ci -q -ma
adding a
$ hg log -T '{short(node)}\n'
3903775176ed
create master bookmark
$ hg bookmark master_bookmark -r tip
$ cd $TESTTMP
setup repo-push and repo-pull
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo-push --noupdate
$ hgclone_treemanifest ssh://user@dummy/repo-hg repo-pull --noupdate
blobimport
$ blobimport repo-hg/.hg repo
start mononoke
$ mononoke
$ wait_for_mononoke $TESTTMP/repo
Do infinitepush (aka commit cloud) push
$ cd repo-push
$ cat >> .hg/hgrc <<EOF
> [extensions]
> remotenames=
> [infinitepush]
> server=False
> branchpattern=re:scratch/.+
> EOF
$ hg up tip
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ echo new > newfile
$ hg addremove -q
$ hg ci -m new
$ hgmn push ssh://user@dummy/repo -r . --to "scratch/123"
pushing to ssh://user@dummy/repo
searching for changes
remote: Infinitepush bookmark push to scratch/123 was ignored
$ tglogp
@ 1: 47da8b81097c draft 'new'
|
o 0: 3903775176ed public 'a' master_bookmark
Bookmark push should have been ignored
$ sqlite3 "$TESTTMP/monsql/bookmarks" 'SELECT name, hg_kind, HEX(changeset_id) FROM bookmarks;'
master_bookmark|pull_default|E10EC6CD13B1CBCFE2384F64BD37FC71B4BF9CFE21487D2EAF5064C1B3C0B793
Commit should have been accepted
$ cd ../repo-pull
$ cat >> .hg/hgrc <<EOF
> [extensions]
> remotenames=
> [infinitepush]
> server=False
> branchpattern=re:scratch/.+
> EOF
$ hgmn pull -r 47da8b81097c5534f3eb7947a8764dd323cffe3d
pulling from ssh://user@dummy/repo
searching for changes
adding changesets
adding manifests
adding file changes
added 1 changesets with 0 changes to 0 files
new changesets 47da8b81097c