copies: expand `_chain` variable name to make the function easier to read
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 13 Nov 2019 20:42:08 +0100
changeset 43784 995066c41bb2
parent 43783 bbd7172bc3df
child 43785 3b039e43a1e6
copies: expand `_chain` variable name to make the function easier to read This came up while explaining what the function is about. I find the function easier to follow that way.
mercurial/copies.py
--- a/mercurial/copies.py	Wed Nov 13 20:45:34 2019 +0100
+++ b/mercurial/copies.py	Wed Nov 13 20:42:08 2019 +0100
@@ -63,12 +63,12 @@
             del t[k]
 
 
-def _chain(a, b):
-    """chain two sets of copies 'a' and 'b'"""
-    t = a.copy()
-    for k, v in pycompat.iteritems(b):
-        t[k] = a.get(v, v)
-    return t
+def _chain(prefix, suffix):
+    """chain two sets of copies 'prefix' and 'suffix'"""
+    result = prefix.copy()
+    for key, value in pycompat.iteritems(suffix):
+        result[key] = prefix.get(value, value)
+    return result
 
 
 def _tracefile(fctx, am, basemf):