2015-09-17 23:59:21 +03:00
|
|
|
Set up upstream repo
|
|
|
|
|
2015-07-14 01:34:10 +03:00
|
|
|
$ echo "[extensions]" >> $HGRCPATH
|
|
|
|
$ echo "share=" >> $HGRCPATH
|
2018-01-03 17:15:47 +03:00
|
|
|
$ echo "remotenames=" >> $HGRCPATH
|
2015-07-14 01:34:10 +03:00
|
|
|
$ hg init upstream
|
|
|
|
$ cd upstream
|
|
|
|
$ touch file0
|
|
|
|
$ hg add file0
|
|
|
|
$ hg commit -m "file0"
|
2015-09-17 23:59:21 +03:00
|
|
|
$ hg bookmark mainline
|
2015-07-14 01:34:10 +03:00
|
|
|
$ cd ..
|
2015-09-17 23:59:21 +03:00
|
|
|
|
|
|
|
Clone primary repo
|
|
|
|
|
2015-07-14 01:34:10 +03:00
|
|
|
$ 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
|
2015-09-17 23:59:21 +03:00
|
|
|
bookmark: default/mainline
|
|
|
|
hoistedname: mainline
|
2015-07-14 01:34:10 +03:00
|
|
|
branch: default/default
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: file0
|
|
|
|
|
2015-09-17 23:59:21 +03:00
|
|
|
|
2015-09-23 22:58:31 +03:00
|
|
|
Share to secondary repo
|
2015-07-14 01:34:10 +03:00
|
|
|
$ cd ..
|
2015-09-17 23:59:21 +03:00
|
|
|
$ hg share -B primary secondary
|
2015-07-14 01:34:10 +03:00
|
|
|
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
|
2015-09-17 23:59:21 +03:00
|
|
|
bookmark: default/mainline
|
|
|
|
hoistedname: mainline
|
2015-07-14 01:34:10 +03:00
|
|
|
branch: default/default
|
|
|
|
user: test
|
|
|
|
date: Thu Jan 01 00:00:00 1970 +0000
|
|
|
|
summary: file0
|
|
|
|
|
2015-09-17 23:59:21 +03:00
|
|
|
|
|
|
|
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]
|