changeset 32887:5281129eb92c

changegroup: rename "srccontent" to "cgnodes" It's the list of nodes in the incoming changegroup, so "cgnodes" made more sense to me.
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 15 Jun 2017 13:42:41 -0700
parents ef015ba5ba2e
children b441296f8e9c
files mercurial/changegroup.py
diffstat 1 files changed, 6 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/changegroup.py	Thu Jun 15 13:42:35 2017 -0700
+++ b/mercurial/changegroup.py	Thu Jun 15 13:42:41 2017 -0700
@@ -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