From patchwork Mon May 29 13:12:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [6,of,7] copies: rename getfctx to getsrcfctx From: Stanislau Hlebik X-Patchwork-Id: 21037 Message-Id: <216a6a72c032ab10e8cc.1496063522@devvm1840.lla2.facebook.com> To: Date: Mon, 29 May 2017 06:12:02 -0700 # HG changeset patch # User Stanislau Hlebik # Date 1496062688 25200 # Mon May 29 05:58:08 2017 -0700 # Node ID 216a6a72c032ab10e8cc8dc6f916593508dc0a45 # Parent e460d9165b77c5333a0288bd423175ad9ac4519a copies: rename getfctx to getsrcfctx In the next patch we'll use getdstfctx. Let's rename getfctx to getsrcfctx in this patch. diff --git a/mercurial/copies.py b/mercurial/copies.py --- a/mercurial/copies.py +++ b/mercurial/copies.py @@ -631,7 +631,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(srcctx) + getsrcfctx = _makegetfctx(srcctx) if msrc[f] == mb.get(f) and not remotebase: # Nothing to merge @@ -639,7 +639,7 @@ of = None seen = {f} - for oc in getfctx(f, msrc[f]).ancestors(): + for oc in getsrcfctx(f, msrc[f]).ancestors(): ocr = oc.linkrev() of = oc.path() if of in seen: @@ -658,7 +658,7 @@ continue # no match, keep looking if mdst[of] == mb.get(of): return # no merge needed, quit early - c2 = getfctx(of, mdst[of]) + c2 = getsrcfctx(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())