Show More
@@ -323,7 +323,10 b' class cg1unpacker(object):' | |||
|
323 | 323 | cgnodes.append(node) |
|
324 | 324 | |
|
325 | 325 | def onchangelog(cl, node): |
|
326 |
|
|
|
326 | rev = cl.rev(node) | |
|
327 | ctx = cl.changelogrevision(rev) | |
|
328 | efilesset.update(ctx.files) | |
|
329 | repo.register_changeset(rev, ctx) | |
|
327 | 330 | |
|
328 | 331 | self.changelogheader() |
|
329 | 332 | deltas = self.deltaiter() |
@@ -97,6 +97,9 b' def commitctx(repo, ctx, error=False, or' | |||
|
97 | 97 | extra, |
|
98 | 98 | ) |
|
99 | 99 | rev = repo[n].rev() |
|
100 | if oldtip != repo.changelog.tiprev(): | |
|
101 | repo.register_changeset(rev, repo.changelog.changelogrevision(rev)) | |
|
102 | ||
|
100 | 103 | xp1, xp2 = p1.hex(), p2 and p2.hex() or b'' |
|
101 | 104 | repo.hook( |
|
102 | 105 | b'pretxncommit', |
@@ -372,6 +372,8 b' def _processchangesetdata(repo, tr, objs' | |||
|
372 | 372 | # so we can set the linkrev accordingly when manifests are added. |
|
373 | 373 | manifestnodes[rev] = revision.manifest |
|
374 | 374 | |
|
375 | repo.register_changeset(rev, revision) | |
|
376 | ||
|
375 | 377 | nodesbyphase = {phase: set() for phase in phases.phasenames.values()} |
|
376 | 378 | remotebookmarks = {} |
|
377 | 379 |
@@ -1641,6 +1641,14 b' class ilocalrepositorymain(interfaceutil' | |||
|
1641 | 1641 | def revbranchcache(): |
|
1642 | 1642 | pass |
|
1643 | 1643 | |
|
1644 | def register_changeset(rev, changelogrevision): | |
|
1645 | """Extension point for caches for new nodes. | |
|
1646 | ||
|
1647 | Multiple consumers are expected to need parts of the changelogrevision, | |
|
1648 | so it is provided as optimization to avoid duplicate lookups. A simple | |
|
1649 | cache would be fragile when other revisions are accessed, too.""" | |
|
1650 | pass | |
|
1651 | ||
|
1644 | 1652 | def branchtip(branchtip, ignoremissing=False): |
|
1645 | 1653 | """Return the tip node for a given branch.""" |
|
1646 | 1654 |
@@ -2062,6 +2062,9 b' class localrepository(object):' | |||
|
2062 | 2062 | self._revbranchcache = branchmap.revbranchcache(self.unfiltered()) |
|
2063 | 2063 | return self._revbranchcache |
|
2064 | 2064 | |
|
2065 | def register_changeset(self, rev, changelogrevision): | |
|
2066 | pass | |
|
2067 | ||
|
2065 | 2068 | def branchtip(self, branch, ignoremissing=False): |
|
2066 | 2069 | """return the tip node for a given branch |
|
2067 | 2070 |
General Comments 0
You need to be logged in to leave comments.
Login now