From e84a78abe579e30417e4538989df9e025487fd80 Mon Sep 17 00:00:00 2001 From: Jun Wu Date: Tue, 28 Mar 2023 09:22:28 -0700 Subject: [PATCH] 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 --- eden/scm/edenscm/scmutil.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/eden/scm/edenscm/scmutil.py b/eden/scm/edenscm/scmutil.py index 2fe7fbd6c5..73b5ea4021 100644 --- a/eden/scm/edenscm/scmutil.py +++ b/eden/scm/edenscm/scmutil.py @@ -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):