Mercurial > public > mercurial-scm > hg-stable
diff mercurial/statichttprepo.py @ 50177:2f60cd6442fd
dirstate: only reload the dirstate when it may have changed
This reinstall the equivalent of what the `filecache` was doing. However it does
it at the dirstate level.
There is a double motivation for this:
- This avoid duplicating logic with the dirstate "identity" logic.
- This increase the lifetime of the `dirstate` object, helping to implement
change scoping.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 22 Feb 2023 01:08:25 +0100 |
parents | c4d587fa161c |
children | ebf1a07539b9 |
line wrap: on
line diff
--- a/mercurial/statichttprepo.py Wed Feb 22 01:04:55 2023 +0100 +++ b/mercurial/statichttprepo.py Wed Feb 22 01:08:25 2023 +0100 @@ -225,6 +225,7 @@ self.encodepats = None self.decodepats = None self._transref = None + self._dirstate = None def _restrictcapabilities(self, caps): caps = super(statichttprepository, self)._restrictcapabilities(caps)