copies: show we can read data from the "first" mapping
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Nov 2019 20:45:34 +0100
changeset 43803 bbd7172bc3df
parent 43802 79750d781928
child 43804 995066c41bb2
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.
mercurial/copies.py
--- a/mercurial/copies.py	Wed Nov 13 20:33:22 2019 +0100
+++ b/mercurial/copies.py	Wed Nov 13 20:45:34 2019 +0100
@@ -67,7 +67,7 @@
     """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