# HG changeset patch # User Pierre-Yves David # Date 1571321166 -7200 # Node ID f0a2c1972e817707f06fc951103ae6090d91b279 # Parent 90213d027154f9154f3704e9bf42e15e22bcd215 copies: simplify chain loop This is a mostly gratuitous change to make the code more direct. Differential Revision: https://phab.mercurial-scm.org/D7131 diff -r 90213d027154 -r f0a2c1972e81 mercurial/copies.py --- a/mercurial/copies.py Thu Oct 17 02:17:24 2019 +0200 +++ b/mercurial/copies.py Thu Oct 17 16:06:06 2019 +0200 @@ -67,10 +67,7 @@ """chain two sets of copies 'a' and 'b'""" t = a.copy() for k, v in pycompat.iteritems(b): - if v in t: - t[k] = t[v] - else: - t[k] = v + t[k] = t.get(v, v) return t