Mercurial > hg
diff mercurial/dirstate.py @ 48790:5ba24e886cec
tracked-key: make it possible to upgrade to and downgrade from the feature
This seems rather important if we want people to start using it.
Differential Revision: https://phab.mercurial-scm.org/D12198
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 17 Feb 2022 06:32:03 +0100 |
parents | 21ac6aedd5e5 |
children | 6e559391f96e |
line wrap: on
line diff
--- a/mercurial/dirstate.py Mon Jan 31 18:13:00 2022 +0300 +++ b/mercurial/dirstate.py Thu Feb 17 06:32:03 2022 +0100 @@ -763,6 +763,13 @@ with file(self._filename_tk) as f: self._write_tracked_key(tr, f) + def delete_tracked_key(self): + """remove the tracked_key file + + To be used by format downgrades operation""" + self._opener.unlink(self._filename_tk) + self._use_tracked_key = False + def addparentchangecallback(self, category, callback): """add a callback to be called when the wd parents are changed