Patchwork [1,of,7] copies: rename m1 to msrc

login
register
mail settings
Submitter Stanislau Hlebik
Date May 29, 2017, 1:11 p.m.
Message ID <75f0d8342109877a0dd6.1496063517@devvm1840.lla2.facebook.com>
Download mbox | patch
Permalink /patch/21032/
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 75f0d8342109877a0dd620df3f566d0f080a9138
# Parent  c2b7fb580794ccbe21fa8c47f493eff6e9431fee
copies: rename m1 to msrc

Small refactoring that renames `m1` parameter name to a more clearer name
`msrc`.
Yuya Nishihara - May 31, 2017, 2:13 p.m.
On Mon, 29 May 2017 06:11:57 -0700, Stanislau Hlebik wrote:
> # HG changeset patch
> # User Stanislau Hlebik <stash@fb.com>
> # Date 1496062335 25200
> #      Mon May 29 05:52:15 2017 -0700
> # Node ID 75f0d8342109877a0dd620df3f566d0f080a9138
> # Parent  c2b7fb580794ccbe21fa8c47f493eff6e9431fee
> copies: rename m1 to msrc

Looks straightforward fix. Queued, thanks.

Patch

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -598,13 +598,13 @@ 
     except StopIteration:
         return False
 
-def _checkcopies(ctx, f, m1, m2, base, tca, remotebase, limit, data):
+def _checkcopies(ctx, f, msrc, m2, base, tca, remotebase, limit, data):
     """
-    check possible copies of f from m1 to m2
+    check possible copies of f from msrc to m2
 
-    ctx = starting context for f in m1
-    f = the filename to check (as in m1)
-    m1 = the source manifest
+    ctx = starting context for f in srcm
+    f = the filename to check (as in msrc)
+    msrc = the source manifest
     m2 = the destination manifest
     base = the changectx used as a merge base
     tca = topological common ancestor for graft-like scenarios
@@ -632,13 +632,13 @@ 
     backwards = not remotebase and base != tca and f in mb
     getfctx = _makegetfctx(ctx)
 
-    if m1[f] == mb.get(f) and not remotebase:
+    if msrc[f] == mb.get(f) and not remotebase:
         # Nothing to merge
         return
 
     of = None
     seen = {f}
-    for oc in getfctx(f, m1[f]).ancestors():
+    for oc in getfctx(f, msrc[f]).ancestors():
         ocr = oc.linkrev()
         of = oc.path()
         if of in seen: