dirstate: add dedicated function for updating data of a file
`dirstate.normal()` is too generic to be a user facing function for that. This
is a part of effort to refactor dirstate APIs and make them clearer.
Differential Revision: https://phab.mercurial-scm.org/D11076
--- a/mercurial/dirstate.py Wed Jul 07 19:36:14 2021 +0200
+++ b/mercurial/dirstate.py Fri Jul 09 15:27:38 2021 +0530
@@ -593,6 +593,14 @@
else:
assert False, 'unreachable'
+ @requires_parents_change
+ def update_parent_file_data(self, f, filedata):
+ """update the information about the content of a file
+
+ This function should be called within a `dirstate.parentchange` context.
+ """
+ self.normal(f, parentfiledata=filedata)
+
def _addpath(
self,
f,