[PATCH 3 of 7] copies: rename ctx to srcctx

Stanislau Hlebik stash at fb.com
Mon May 29 09:11:59 EDT 2017


# HG changeset patch
# User Stanislau Hlebik <stash at fb.com>
# Date 1496062577 25200
#      Mon May 29 05:56:17 2017 -0700
# Node ID cff8c67aae48c7ee7c07b0878e15fb5aa54aed8c
# Parent  2cf8c7e99a33dce384b49d3fd0fc4c9512ee94b5
copies: rename ctx to srcctx

In the next diff we'll pass new dstctx parameter. Let's rename ctx to srcctx in
this patch.

diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -598,17 +598,17 @@
     except StopIteration:
         return False
 
-def _checkcopies(ctx, f, msrc, mdst, base, tca, remotebase, limit, data):
+def _checkcopies(srcctx, f, msrc, mdst, base, tca, remotebase, limit, data):
     """
     check possible copies of f from msrc to mdst
 
-    ctx = starting context for f in srcm
+    srcctx = starting context for f in msrc
     f = the filename to check (as in msrc)
     msrc = the source 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
+    remotebase = True if base is outside tca::srcctx, False otherwise
     limit = the rev number to not search beyond
     data = dictionary of dictionary to store copy data. (see mergecopies)
 
@@ -630,7 +630,7 @@
     # the base) this is more complicated as we must detect a divergence.
     # We use 'backwards = False' in that case.
     backwards = not remotebase and base != tca and f in mb
-    getfctx = _makegetfctx(ctx)
+    getfctx = _makegetfctx(srcctx)
 
     if msrc[f] == mb.get(f) and not remotebase:
         # Nothing to merge


More information about the Mercurial-devel mailing list