Patchwork [4,of,6] changegroup: rename "srccontent" to "cgnodes"

login
register
mail settings
Submitter via Mercurial-devel
Date June 15, 2017, 10:25 p.m.
Message ID <83f5bf2b6c94b43d9bf1.1497565531@martinvonz.svl.corp.google.com>
Download mbox | patch
Permalink /patch/21416/
State Accepted
Headers show

Comments

via Mercurial-devel - June 15, 2017, 10:25 p.m.
# HG changeset patch
# User Martin von Zweigbergk <martinvonz@google.com>
# Date 1497559361 25200
#      Thu Jun 15 13:42:41 2017 -0700
# Node ID 83f5bf2b6c94b43d9bf1d61b518c1b75fb8be417
# Parent  d3ebf9b15b904c0ac40dd8e0553fc31464374635
changegroup: rename "srccontent" to "cgnodes"

It's the list of nodes in the incoming changegroup, so "cgnodes" made
more sense to me.

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -315,11 +315,11 @@ 
                     efiles.update(cl.readfiles(node))
 
                 self.changelogheader()
-                srccontent = cl.addgroup(self, csmap, trp,
-                                         addrevisioncb=onchangelog)
+                cgnodes = cl.addgroup(self, csmap, trp,
+                                      addrevisioncb=onchangelog)
                 efiles = len(efiles)
 
-                if not (srccontent or emptyok):
+                if not (cgnodes or emptyok):
                     raise error.Abort(_("received changelog group is empty"))
                 clend = len(cl)
                 changesets = clend - clstart
@@ -338,7 +338,7 @@ 
                     for cset in xrange(clstart, clend):
                         mfnode = cl.changelogrevision(cset).manifest
                         mfest = ml[mfnode].readdelta()
-                        # store file nodes we must see
+                        # store file cgnodes we must see
                         for f, n in mfest.iteritems():
                             needfiles.setdefault(f, set()).add(n)
 
@@ -386,15 +386,13 @@ 
                     # We should not use added here but the list of all change in
                     # the bundle
                     if publishing:
-                        phases.advanceboundary(repo, tr, phases.public,
-                                               srccontent)
+                        phases.advanceboundary(repo, tr, phases.public, cgnodes)
                     else:
                         # Those changesets have been pushed from the
                         # outside, their phases are going to be pushed
                         # alongside. Therefor `targetphase` is
                         # ignored.
-                        phases.advanceboundary(repo, tr, phases.draft,
-                                               srccontent)
+                        phases.advanceboundary(repo, tr, phases.draft, cgnodes)
                         phases.retractboundary(repo, tr, phases.draft, added)
                 elif srctype != 'strip':
                     # publishing only alter behavior during push