Skip to content
Snippets Groups Projects
Commit 98ca9078 authored by Gregory Szorc's avatar Gregory Szorc
Browse files

localrepo: resolve store and cachevfs in makelocalrepository()

This is mostly a code move and refactor.

One change is that we now explicitly look for requirements indicating
a share is being used rather than blindly try to read from
.hg/sharedpath. Requirements *should* be all that is necessary to
dictate high-level behavior and I'm not sure why the previous code
was doing what it was.

The previous code has been in place since 87d1fd40f57e (authored in
2009). And the commit immediately after that (971e38a9344b) introduced
``hg.share()`` and always wrote the ``shared`` requirement. And as far
as I can tell, every revision of ``hg.share()`` since has written
either the ``shared`` or ``relshared`` requirement. So I'm pretty
sure we don't need to maintain BC by always looking for and honoring
the ``.hg/sharedpath`` file even if a requirement isn't present.

.. bc::

   A repository will no longer use shared storage if it has a
   ``.hg/sharedpath`` file but no entry in ``.hg/requires`` saying it
   is shared.

   This change should not have any end-user impact, as all shared
   repos should have a ``.hg/requires`` file indicating this.

Differential Revision: https://phab.mercurial-scm.org/D4573
parent 9de1a1c8
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment