comparison mercurial/localrepo.py @ 46371:0903d6b9b1df

repository: introduce register_changeset callback The new callback is called whenever a changeset is added to the repository (commit, unbundle or exchange). Since the bulk operations already parse the changeset (readfiles or full changesetrevision), always use the latter to avoid redundant lookups. The first consumer of the new interface needs to look at extra. Differential Revision: https://phab.mercurial-scm.org/D9780
author Joerg Sonnenberger <joerg@bec.de>
date Tue, 19 Jan 2021 00:20:53 +0100
parents 4b0192f592cf
children 3e91d9978bec
comparison
equal deleted inserted replaced
46370:cad17d50736c 46371:0903d6b9b1df
2060 def revbranchcache(self): 2060 def revbranchcache(self):
2061 if not self._revbranchcache: 2061 if not self._revbranchcache:
2062 self._revbranchcache = branchmap.revbranchcache(self.unfiltered()) 2062 self._revbranchcache = branchmap.revbranchcache(self.unfiltered())
2063 return self._revbranchcache 2063 return self._revbranchcache
2064 2064
2065 def register_changeset(self, rev, changelogrevision):
2066 pass
2067
2065 def branchtip(self, branch, ignoremissing=False): 2068 def branchtip(self, branch, ignoremissing=False):
2066 """return the tip node for a given branch 2069 """return the tip node for a given branch
2067 2070
2068 If ignoremissing is True, then this method will not raise an error. 2071 If ignoremissing is True, then this method will not raise an error.
2069 This is helpful for callers that only expect None for a missing branch 2072 This is helpful for callers that only expect None for a missing branch