This is an archive of the discontinued Mercurial Phabricator instance.

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

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



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

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

Diff Detail

rHG Mercurial
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

pulkit created this revision.Sep 18 2020, 10:41 AM
pulkit updated this revision to Diff 22773.Sep 23 2020, 3:22 AM
marmoute requested changes to this revision.Sep 26 2020, 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 ?


We shoulddrop the BROKEN:, should we not?

This revision now requires changes to proceed.Sep 26 2020, 6:51 AM
pulkit added inline comments.Sep 28 2020, 2:13 AM

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.Sep 28 2020, 5:25 AM

ha, okay

This revision now requires review to proceed.Sep 28 2020, 5:25 AM
pulkit updated this revision to Diff 23256.Oct 16 2020, 4:02 AM
marmoute accepted this revision.Oct 16 2020, 6:26 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.