Page MenuHomePhabricator

dispatch: load shared source repository config in share-safe mode
Needs ReviewPublic

Authored by pulkit on Sep 18 2020, 10:41 AM.

Details

Reviewers
marmoute
Group Reviewers
hg-reviewers
Summary

It seems to me now that there are two steps when config is loaded:

  1. on dispatch
  2. repository object creation

Recent patches added functionality that there can be shares in share-safe mode
where config of the source repository is shared with the the shares. However we
missed adding logic to read the source config on dispatch. This leads to
extensions not being loaded on dispatch and hence extensions command not being
recognized.

This patch fixes it by reading the shared source config on dispatch.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

pulkit created this revision.Sep 18 2020, 10:41 AM
pulkit updated this revision to Diff 22773.Wed, Sep 23, 3:22 AM
marmoute requested changes to this revision.Sat, Sep 26, 6:51 AM
marmoute added a subscriber: marmoute.

The logic looks good, but I hve a minor point on about the test.

Having to call the couple of function every time seems a bit cumbersome and fragile. Maybe we should introduce a new function doing both ?

tests/test-share-safe.t
105–106

We shoulddrop the BROKEN:, should we not?

This revision now requires changes to proceed.Sat, Sep 26, 6:51 AM
pulkit added inline comments.Mon, Sep 28, 2:13 AM
tests/test-share-safe.t
105–106

Nope. hg debugextensions is still broken as it shows list of extension according to config values specified and not according to ones which are loaded while running a command. The previous patch demonstrates that. This patch does not fix debugextensions but rather fix bug with not-loading extensions.

marmoute accepted this revision.Mon, Sep 28, 5:25 AM

ha, okay

This revision now requires review to proceed.Mon, Sep 28, 5:25 AM
pulkit updated this revision to Diff 23256.Fri, Oct 16, 4:02 AM
marmoute accepted this revision.Fri, Oct 16, 6:26 AM