mercurial/changegroup.py
changeset 26595 be0489770925
parent 26587 56b2bcea2529
child 26694 c2e6e3cc7cb4
equal deleted inserted replaced
26594:75e29fcc5a71 26595:be0489770925
   582 
   582 
   583     repo.hook('preoutgoing', throw=True, source=source)
   583     repo.hook('preoutgoing', throw=True, source=source)
   584     _changegroupinfo(repo, csets, source)
   584     _changegroupinfo(repo, csets, source)
   585     return bundler.generate(commonrevs, csets, fastpathlinkrev, source)
   585     return bundler.generate(commonrevs, csets, fastpathlinkrev, source)
   586 
   586 
   587 def getsubset(repo, outgoing, bundler, source, fastpath=False, version='01'):
   587 def getsubset(repo, outgoing, bundler, source, fastpath=False):
   588     gengroup = getsubsetraw(repo, outgoing, bundler, source, fastpath)
   588     gengroup = getsubsetraw(repo, outgoing, bundler, source, fastpath)
   589     return packermap[version][1](util.chunkbuffer(gengroup), None)
   589     return packermap[bundler.version][1](util.chunkbuffer(gengroup), None)
   590 
   590 
   591 def changegroupsubset(repo, roots, heads, source, version='01'):
   591 def changegroupsubset(repo, roots, heads, source, version='01'):
   592     """Compute a changegroup consisting of all the nodes that are
   592     """Compute a changegroup consisting of all the nodes that are
   593     descendants of any of the roots and ancestors of any of the heads.
   593     descendants of any of the roots and ancestors of any of the heads.
   594     Return a chunkbuffer object whose read() method will return
   594     Return a chunkbuffer object whose read() method will return
   611     csets, roots, heads = cl.nodesbetween(roots, heads)
   611     csets, roots, heads = cl.nodesbetween(roots, heads)
   612     included = set(csets)
   612     included = set(csets)
   613     discbases = [n for n in discbases if n not in included]
   613     discbases = [n for n in discbases if n not in included]
   614     outgoing = discovery.outgoing(cl, discbases, heads)
   614     outgoing = discovery.outgoing(cl, discbases, heads)
   615     bundler = packermap[version][0](repo)
   615     bundler = packermap[version][0](repo)
   616     return getsubset(repo, outgoing, bundler, source, version=version)
   616     return getsubset(repo, outgoing, bundler, source)
   617 
   617 
   618 def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None,
   618 def getlocalchangegroupraw(repo, source, outgoing, bundlecaps=None,
   619                            version='01'):
   619                            version='01'):
   620     """Like getbundle, but taking a discovery.outgoing as an argument.
   620     """Like getbundle, but taking a discovery.outgoing as an argument.
   621 
   621