Patchwork [2,of,7] copies: rename m2 to mdst

login
register
mail settings
Submitter Stanislau Hlebik
Date May 29, 2017, 1:11 p.m.
Message ID <2cf8c7e99a33dce384b4.1496063518@devvm1840.lla2.facebook.com>
Download mbox | patch
Permalink /patch/21033/
State Accepted
Headers show

Comments

Stanislau Hlebik - May 29, 2017, 1:11 p.m.
# HG changeset patch
# User Stanislau Hlebik <stash@fb.com>
# Date 1496062335 25200
#      Mon May 29 05:52:15 2017 -0700
# Node ID 2cf8c7e99a33dce384b49d3fd0fc4c9512ee94b5
# Parent  75f0d8342109877a0dd620df3f566d0f080a9138
copies: rename m2 to mdst

Small refactoring to rename m2 to more clearer mdst.

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -598,14 +598,14 @@ 
     except StopIteration:
         return False
 
-def _checkcopies(ctx, f, msrc, m2, base, tca, remotebase, limit, data):
+def _checkcopies(ctx, f, msrc, mdst, base, tca, remotebase, limit, data):
     """
-    check possible copies of f from msrc to m2
+    check possible copies of f from msrc to mdst
 
     ctx = starting context for f in srcm
     f = the filename to check (as in msrc)
     msrc = the source manifest
-    m2 = the destination manifest
+    mdst = the destination manifest
     base = the changectx used as a merge base
     tca = topological common ancestor for graft-like scenarios
     remotebase = True if base is outside tca::ctx, False otherwise
@@ -653,11 +653,11 @@ 
             data['fullcopy'][of] = f # grafting backwards through renames
         else:
             data['fullcopy'][f] = of
-        if of not in m2:
+        if of not in mdst:
             continue # no match, keep looking
-        if m2[of] == mb.get(of):
+        if mdst[of] == mb.get(of):
             return # no merge needed, quit early
-        c2 = getfctx(of, m2[of])
+        c2 = getfctx(of, mdst[of])
         # c2 might be a plain new file on added on destination side that is
         # unrelated to the droids we are looking for.
         cr = _related(oc, c2, tca.rev())