nodeipc: notify ISL about commit rewrites

Summary:
`scmutil.cleanupnode` is the "common" code path for commit rewrites (except for
"split"). Update it to notify ISL about the commit rewrite source and
destination.

Reviewed By: muirdm

Differential Revision: D44439674

fbshipit-source-id: 9e8bb7b12aba31619d0a843fdf9939682afe3e53
This commit is contained in:
Jun Wu 2023-03-28 09:22:28 -07:00 committed by Facebook GitHub Bot
parent dd2fc39ce7
commit e84a78abe5

View File

@ -876,7 +876,17 @@ def cleanupnodes(repo, replacements, operation, moves=None, metadata=None):
if tostrip:
repair.delayedstrip(repo.ui, repo, tostrip, operation)
return moves
# Notify ISL that commits are moved.
ipc = bindings.nodeipc.IPC
if ipc:
ipc.send(
{
"type": "commitRewrite",
"nodeMap": {hex(old): hex(new) for old, new in moves.items()},
}
)
return moves
def addremove(repo, matcher, prefix, opts=None, dry_run=None, similarity=None):