comparison mercurial/copies.py @ 43783:bbd7172bc3df

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.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Wed, 13 Nov 2019 20:45:34 +0100
parents 79750d781928
children 995066c41bb2
comparison
equal deleted inserted replaced
43782:79750d781928 43783:bbd7172bc3df
65 65
66 def _chain(a, b): 66 def _chain(a, b):
67 """chain two sets of copies 'a' and 'b'""" 67 """chain two sets of copies 'a' and 'b'"""
68 t = a.copy() 68 t = a.copy()
69 for k, v in pycompat.iteritems(b): 69 for k, v in pycompat.iteritems(b):
70 t[k] = t.get(v, v) 70 t[k] = a.get(v, v)
71 return t 71 return t
72 72
73 73
74 def _tracefile(fctx, am, basemf): 74 def _tracefile(fctx, am, basemf):
75 """return file context that is the ancestor of fctx present in ancestor 75 """return file context that is the ancestor of fctx present in ancestor