diff hgext/fix.py @ 45713:04de8a1ec08f

fix: update commit hash references in the new commits Differential Revision: https://phab.mercurial-scm.org/D9183
author Matt Harbison <matt_harbison@yahoo.com>
date Fri, 09 Oct 2020 00:33:50 -0400
parents 3ea3b85df03f
children f90943d753ef
line wrap: on
line diff
--- a/hgext/fix.py	Fri Oct 09 00:14:07 2020 -0400
+++ b/hgext/fix.py	Fri Oct 09 00:33:50 2020 -0400
@@ -815,8 +815,14 @@
         if copysource:
             wctx.markcopied(path, copysource)
 
+    desc = rewriteutil.update_hash_refs(
+        repo,
+        ctx.description(),
+        {oldnode: [newnode] for oldnode, newnode in replacements.items()},
+    )
+
     memctx = wctx.tomemctx(
-        text=ctx.description(),
+        text=desc,
         branch=ctx.branch(),
         extra=extra,
         date=ctx.date(),