sapling/tests/test-remotenames-shared-repo.t
Durham Goode ad813edcbd treemanifest: enable treemanifest by default in tests
Summary:
Now that all our repos are treemanifest, let's enable the extension by
default in tests. Once we're certain no one needs it in production we'll also
make it the default in core Mercurial.

This diff includes a minor fix in treemanifest to be aware of always-enabled
extensions. It won't matter until we actually add treemanifest to the list of
default enabled extensions, but I caught this while testing things.

Reviewed By: ikostia

Differential Revision: D15030253

fbshipit-source-id: d8361f915928b6ad90665e6ed330c1df5c8d8d86
2019-05-28 03:17:02 -07:00

54 lines
1.4 KiB
Perl

$ setconfig extensions.treemanifest=!
Set up upstream repo
$ echo "[extensions]" >> $HGRCPATH
$ echo "share=" >> $HGRCPATH
$ echo "remotenames=" >> $HGRCPATH
$ hg init upstream
$ cd upstream
$ touch file0
$ hg add file0
$ hg commit -m "file0"
$ hg bookmark mainline
$ cd ..
Clone primary repo
$ hg clone upstream primary
updating to branch default
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd primary
$ hg log --graph
@ changeset: 0:d26a60f4f448
tag: tip
bookmark: default/mainline
hoistedname: mainline
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: file0
Share to secondary repo
$ cd ..
$ hg share -B primary secondary
updating working directory
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ cd secondary
$ hg log --graph
@ changeset: 0:d26a60f4f448
tag: tip
bookmark: default/mainline
hoistedname: mainline
user: test
date: Thu Jan 01 00:00:00 1970 +0000
summary: file0
Check that tracking is also shared
$ hg book local -t default/mainline
$ hg book -v
* local 0:d26a60f4f448 [default/mainline]
$ cd ../primary
$ hg book -v
local 0:d26a60f4f448 [default/mainline]