This is an archive of the discontinued Mercurial Phabricator instance.

localrepo: document and test bug around opening shared repos
ClosedPublic

Authored by indygreg on Sep 13 2018, 12:29 PM.

Details

Summary

As part of refactoring this code, I realized that we don't
validate the requirements of a shared repository. This commit
documents that next to the requirements validation code and adds a
test demonstrating the buggy behavior.

I'm not sure if I'll fix this. But it is definitely a bug that
users could encounter, as LFS, narrow, and potentially other
extensions dynamically add requirements on first use. One part
of this I'm not sure about is how to handle loading the .hg/hgrc
of the shared repo. We need to do that in order to load extensions.
But we don't want that repo's hgrc to overwrite the current repo's.

Diff Detail

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

Event Timeline

indygreg created this revision.Sep 13 2018, 12:29 PM

FIWI, I don't think I would expect the .hg/hgrc of the source repo to be loaded. I don't think I'd be surprised if I configured an extension in the source repo and had to configure that in the share as well for it to work.

This revision was automatically updated to reflect the committed changes.