sapling/eden/scm/tests/test-remotenames-fastheaddiscovery-hidden-commits.t
Durham Goode e9e0539cc1 filepeer: disable use of filepeer by default
Summary:
We want to remove filepeer as part of removing server logic in the
client. To start with, let's disable it by default and only enable it in tests
that need it. The next step will be to update those tests.

Reviewed By: quark-zju

Differential Revision: D30977765

fbshipit-source-id: c56016f017e894a15bf43fb7a8d3a0a417663ad9
2021-09-22 18:03:29 -07:00

54 lines
932 B
Perl

#chg-compatible
$ setconfig experimental.allowfilepeer=True
$ enable remotenames
$ enable amend
$ setconfig remotenames.fastheaddiscovery=True
Set up repositories
$ hg init repo1
$ hg clone -q repo1 repo2
$ hg clone -q repo1 repo3
Set up the repos with a remote bookmark
$ cd repo2
$ echo a > a
$ hg commit -Aqm commitA
$ hg push -q --to book --create
$ cd ..
$ cd repo3
$ hg pull -q -B book
$ cd ..
Produce a new commit in repo2
$ cd repo2
$ echo b > b
$ hg commit -Aqm commitB
$ hg bundle -q -r . ../bundleB
$ hg push -q --to book
$ cd ..
Load the commit in repo3, hide it, check that we can still pull.
$ cd repo3
$ hg unbundle -q ../bundleB
$ hg log -r tip -T '{desc}\n'
commitB
$ hg hide -q -r tip
$ hg update -q default/book
$ hg log -r tip -T '{desc}\n'
commitB
$ hg pull -q
$ hg log -r "reverse(::book)" -T '{desc}\n'
commitB
commitA
$ cd ..