Mercurial > hg-stable
view tests/test-wireproto-command-lookup.t @ 45496:b71858b42963
localrepo: load the share source .hg/hgrc also in share-safe mode (API)
The second part of the Share Safe Plan is to share source repo config also.
This patch adds logic to load the source repo .hg/hgrc if we are in share safe
mode. On unshare, we copy and prepend source config to current repo so that
config which was shared is persisted.
A test is added to show that now if we enable a hook on the source repo, that
also runs on the shared repositories.
API change as a new optional argument sharedvfs added to localrepo.loadhgrc()
Differential Revision: https://phab.mercurial-scm.org/D8656
author | Pulkit Goyal <7895pulkit@gmail.com> |
---|---|
date | Thu, 02 Jul 2020 16:23:36 +0530 |
parents | b1507ab0c6cf |
children |
line wrap: on
line source
$ . $TESTDIR/wireprotohelpers.sh $ hg init server $ enablehttpv2 server $ cd server $ cat >> .hg/hgrc << EOF > [web] > push_ssl = false > allow-push = * > EOF $ hg debugdrawdag << EOF > C D > |/ > B > | > A > EOF $ root_node=$(hg log -r A -T '{node}') $ hg serve -p $HGPORT -d --pid-file hg.pid -E error.log $ cat hg.pid > $DAEMON_PIDS lookup for known node works $ sendhttpv2peer << EOF > command lookup > key $root_node > EOF creating http peer for wire protocol version 2 sending lookup command response: b'Bk\xad\xa5\xc6u\x98\xcae\x03mW\xd9\xe4\xb6K\x0c\x1c\xe7\xa0' $ cat error.log