Mercurial > hg
view tests/test-default-push.t @ 17873:573bec4ab7ba stable
subrepo: isolate configuration between each repositories in subrepo tree
Before this patch, repository local configurations are not isolated
between repositories in subrepo tree, because "localrepository"
objects for each subrepositories are created with "ui" instance of the
parent of each ones.
So, local configuration of the parent or higher repositories are
visible also in children or lower ones.
This patch uses "baseui" instead of "ui" to create repository object:
the former contains only global configuration.
This patch also copies 'ui.commitsubrepos' configuration to commit
recursively in subrepo tree, because it may be set in not
"repo.baseui" but "repo.ui".
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Sat, 29 Sep 2012 20:11:24 +0900 |
parents | 9910f60a37ee |
children | c4f45ce85351 |
line wrap: on
line source
$ hg init a $ echo a > a/a $ hg --cwd a ci -Ama adding a $ hg clone a c updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg clone a b updating to branch default 1 files updated, 0 files merged, 0 files removed, 0 files unresolved $ echo b >> b/a $ hg --cwd b ci -mb Push should push to 'default' when 'default-push' not set: $ hg --cwd b push pushing to $TESTTMP/a (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files Push should push to 'default-push' when set: $ echo 'default-push = ../c' >> b/.hg/hgrc $ hg --cwd b push pushing to $TESTTMP/c (glob) searching for changes adding changesets adding manifests adding file changes added 1 changesets with 1 changes to 1 files