comparison mercurial/dirstate.py @ 47095:473abf4728bf

dirstate-tree: Empty shell for a second Rust DirstateMap implementation For background see description of the previous changeset "Make Rust DirstateMap bindings go through a trait object". Add an empty shell for a opt-in second Rust implementation of the `DirstateMap` type and the `status` function. For now all methods panic. This can be seen in "action" with: ./hg status --config experimental.dirstate-tree.in-memory=1 Differential Revision: https://phab.mercurial-scm.org/D10364
author Simon Sapin <simon.sapin@octobus.net>
date Tue, 30 Mar 2021 09:56:04 +0200
parents e061a1df32a8
children b6339a993b91
comparison
equal deleted inserted replaced
47094:e061a1df32a8 47095:473abf4728bf
1788 def _inner_rustmap(self): 1788 def _inner_rustmap(self):
1789 """ 1789 """
1790 Does not fill the Dirstatemap when called. This allows for 1790 Does not fill the Dirstatemap when called. This allows for
1791 optimizations where only setting/getting the parents is needed. 1791 optimizations where only setting/getting the parents is needed.
1792 """ 1792 """
1793 self._inner_rustmap = rustmod.DirstateMap(self._root) 1793 use_dirstate_tree = self._ui.configbool(
1794 b"experimental",
1795 b"dirstate-tree.in-memory",
1796 False,
1797 )
1798 self._inner_rustmap = rustmod.DirstateMap(use_dirstate_tree)
1794 return self._inner_rustmap 1799 return self._inner_rustmap
1795 1800
1796 @property 1801 @property
1797 def copymap(self): 1802 def copymap(self):
1798 return self._rustmap.copymap() 1803 return self._rustmap.copymap()