# HG changeset patch # User Pulkit Goyal <7895pulkit@gmail.com> # Date 2021-07-09 09:57:38 # Node ID a9d75262b992929aade204ef2da37f678bb1e07a # Parent e2e72daac90b6366c95ba3add04843cd719196aa 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 diff --git a/mercurial/dirstate.py b/mercurial/dirstate.py --- a/mercurial/dirstate.py +++ b/mercurial/dirstate.py @@ -593,6 +593,14 @@ class dirstate(object): 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,