diff -r e10000369b47 -r 5174c48ed8d8 mercurial/localrepo.py --- a/mercurial/localrepo.py Tue Apr 01 13:45:48 2014 -0700 +++ b/mercurial/localrepo.py Tue Apr 01 13:59:55 2014 -0700 @@ -1714,7 +1714,7 @@ discbases.extend([p for p in cl.parents(n) if p != nullid]) outgoing = discovery.outgoing(cl, discbases, heads) bundler = changegroup.bundle10(self) - return self._changegroupsubset(outgoing, bundler, source) + return changegroup.getsubset(self, outgoing, bundler, source) def getlocalbundle(self, source, outgoing, bundlecaps=None): """Like getbundle, but taking a discovery.outgoing as an argument. @@ -1724,7 +1724,7 @@ if not outgoing.missing: return None bundler = changegroup.bundle10(self, bundlecaps) - return self._changegroupsubset(outgoing, bundler, source) + return changegroup.getsubset(self, outgoing, bundler, source) def getbundle(self, source, heads=None, common=None, bundlecaps=None): """Like changegroupsubset, but returns the set difference between the @@ -1747,24 +1747,6 @@ discovery.outgoing(cl, common, heads), bundlecaps=bundlecaps) - @unfilteredmethod - def _changegroupsubset(self, outgoing, bundler, source, - fastpath=False): - commonrevs = outgoing.common - csets = outgoing.missing - heads = outgoing.missingheads - # We go through the fast path if we get told to, or if all (unfiltered - # heads have been requested (since we then know there all linkrevs will - # be pulled by the client). - heads.sort() - fastpathlinkrev = fastpath or ( - self.filtername is None and heads == sorted(self.heads())) - - self.hook('preoutgoing', throw=True, source=source) - self.changegroupinfo(csets, source) - gengroup = bundler.generate(commonrevs, csets, fastpathlinkrev, source) - return changegroup.unbundle10(util.chunkbuffer(gengroup), 'UN') - def changegroup(self, basenodes, source): # to avoid a race we use changegroupsubset() (issue1320) return self.changegroupsubset(basenodes, self.heads(), source)