diff --git a/hgext/git/dirstate.py b/hgext/git/dirstate.py --- a/hgext/git/dirstate.py +++ b/hgext/git/dirstate.py @@ -72,6 +72,7 @@ self._ui = ui self._root = os.path.dirname(root) self.git = gitrepo + self._plchangecallbacks = {} def p1(self): return self.git.head.peel().id.raw @@ -202,6 +203,7 @@ return False def write(self, tr): + # TODO: call parent change callbacks if tr: @@ -285,6 +287,10 @@ # TODO: track this maybe? yield + def addparentchangecallback(self, category, callback): + # TODO: should this be added to the dirstate interface? + self._plchangecallbacks[category] = callback + def clearbackup(self, tr, backupname): # TODO pass