Patchwork D686: changegroup: add source parameter to generatemanifests

login
register
mail settings
Submitter phabricator
Date Sept. 14, 2017, 3:20 a.m.
Message ID <38e105563aff6c119479ee5cbef6453e@localhost.localdomain>
Download mbox | patch
Permalink /patch/23880/
State Not Applicable
Headers show

Comments

phabricator - Sept. 14, 2017, 3:20 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG75cc1f1e11f2: changegroup: add source parameter to generatemanifests (authored by durham, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D686?vs=1742&id=1806

REVISION DETAIL
  https://phab.mercurial-scm.org/D686

AFFECTED FILES
  mercurial/changegroup.py

CHANGE DETAILS




To: durham, #hg-reviewers, indygreg
Cc: mercurial-devel

Patch

diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -662,7 +662,7 @@ 
             'treemanifest' not in repo.requirements)
 
         for chunk in self.generatemanifests(commonrevs, clrevorder,
-                fastpathlinkrev, mfs, fnodes):
+                fastpathlinkrev, mfs, fnodes, source):
             yield chunk
         mfs.clear()
         clrevs = set(cl.rev(x) for x in clnodes)
@@ -688,7 +688,12 @@ 
             repo.hook('outgoing', node=hex(clnodes[0]), source=source)
 
     def generatemanifests(self, commonrevs, clrevorder, fastpathlinkrev, mfs,
-                          fnodes):
+                          fnodes, source):
+        """Returns an iterator of changegroup chunks containing manifests.
+
+        `source` is unused here, but is used by extensions like remotefilelog to
+        change what is sent based in pulls vs pushes, etc.
+        """
         repo = self._repo
         mfl = repo.manifestlog
         dirlog = mfl._revlog.dirlog