Patchwork [2,of,5] copies: show we can read data from the "first" mapping

mail settings
Submitter Pierre-Yves David
Date Dec. 2, 2019, 11:28 a.m.
Message ID <>
Download mbox | patch
Permalink /patch/43556/
State Accepted
Headers show


Pierre-Yves David - Dec. 2, 2019, 11:28 a.m.
# HG changeset patch
# User Pierre-Yves David <>
# Date 1573674334 -3600
#      Wed Nov 13 20:45:34 2019 +0100
# Node ID 2671000fb23f978fbacb56cd168d4a5f529c0b59
# Parent  79af3064c0b820d4339e595eb89d40e930eeadfd
# EXP-Topic patch-copies-rust-prep
# Available At
#              hg pull -r 2671000fb23f
copies: show we can read data from the "first" mapping

In practice this make no difference since `t` is a copy of `a`. Having this
change before hand will make the next cleanup changeset clearer.

This is work on the road to using some native code for some performance critical
part of copy tracing.


diff --git a/mercurial/ b/mercurial/
--- a/mercurial/
+++ b/mercurial/
@@ -67,7 +67,7 @@  def _chain(a, b):
     """chain two sets of copies 'a' and 'b'"""
     t = a.copy()
     for k, v in pycompat.iteritems(b):
-        t[k] = t.get(v, v)
+        t[k] = a.get(v, v)
     return t