Mercurial > hg
comparison mercurial/exchangev2.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 | 009130064813 |
children | 711ba0f1057e |
comparison
equal
deleted
inserted
replaced
46370:cad17d50736c | 46371:0903d6b9b1df |
---|---|
370 | 370 |
371 # We need to preserve the mapping of changelog revision to node | 371 # We need to preserve the mapping of changelog revision to node |
372 # so we can set the linkrev accordingly when manifests are added. | 372 # so we can set the linkrev accordingly when manifests are added. |
373 manifestnodes[rev] = revision.manifest | 373 manifestnodes[rev] = revision.manifest |
374 | 374 |
375 repo.register_changeset(rev, revision) | |
376 | |
375 nodesbyphase = {phase: set() for phase in phases.phasenames.values()} | 377 nodesbyphase = {phase: set() for phase in phases.phasenames.values()} |
376 remotebookmarks = {} | 378 remotebookmarks = {} |
377 | 379 |
378 # addgroup() expects a 7-tuple describing revisions. This normalizes | 380 # addgroup() expects a 7-tuple describing revisions. This normalizes |
379 # the wire data to that format. | 381 # the wire data to that format. |