D4685: changegroup: tease out a temporary prune method for manifests
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Sep 20 15:44:51 EDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGe03c1a63155c: changegroup: tease out a temporary prune method for manifests (authored by durin42, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D4685?vs=11225&id=11236
REVISION DETAIL
https://phab.mercurial-scm.org/D4685
AFFECTED FILES
mercurial/changegroup.py
CHANGE DETAILS
diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
--- a/mercurial/changegroup.py
+++ b/mercurial/changegroup.py
@@ -1073,10 +1073,7 @@
if not self._filematcher.visitdir(store.tree[:-1] or '.'):
prunednodes = []
else:
- frev, flr = store.rev, store.linkrev
- prunednodes = [n for n in nodes
- if flr(frev(n)) not in commonrevs]
-
+ prunednodes = self._prunemanifests(store, nodes, commonrevs)
if tree and not prunednodes:
continue
@@ -1093,6 +1090,16 @@
yield tree, deltas
+ def _prunemanifests(self, store, nodes, commonrevs):
+ # This is split out as a separate method to allow filtering
+ # commonrevs in extension code.
+ #
+ # TODO(augie): this shouldn't be required, instead we should
+ # make filtering of revisions to send delegated to the store
+ # layer.
+ frev, flr = store.rev, store.linkrev
+ return [n for n in nodes if flr(frev(n)) not in commonrevs]
+
# The 'source' parameter is useful for extensions
def generatefiles(self, changedfiles, commonrevs, source,
mfdicts, fastpathlinkrev, fnodes, clrevs):
To: durin42, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list