##// END OF EJS Templates
localrepo: move the changegroup method in changegroup module...
Pierre-Yves David -
r20931:de60ca3a default
parent child Browse files
Show More
@@ -510,3 +510,7 b' def getbundle(repo, source, heads=None, '
510 outgoing = discovery.outgoing(cl, common, heads)
510 outgoing = discovery.outgoing(cl, common, heads)
511 return getlocalbundle(repo, source, outgoing, bundlecaps=bundlecaps)
511 return getlocalbundle(repo, source, outgoing, bundlecaps=bundlecaps)
512
512
513 def changegroup(repo, basenodes, source):
514 # to avoid a race we use changegroupsubset() (issue1320)
515 return changegroupsubset(repo, basenodes, repo.heads(), source)
516
@@ -140,7 +140,7 b' class locallegacypeer(localpeer):'
140 return self._repo.between(pairs)
140 return self._repo.between(pairs)
141
141
142 def changegroup(self, basenodes, source):
142 def changegroup(self, basenodes, source):
143 return self._repo.changegroup(basenodes, source)
143 return changegroup.changegroup(self._repo, basenodes, source)
144
144
145 def changegroupsubset(self, bases, heads, source):
145 def changegroupsubset(self, bases, heads, source):
146 return changegroup.changegroupsubset(self._repo, bases, heads, source)
146 return changegroup.changegroupsubset(self._repo, bases, heads, source)
@@ -1683,11 +1683,6 b' class localrepository(object):'
1683 def push(self, remote, force=False, revs=None, newbranch=False):
1683 def push(self, remote, force=False, revs=None, newbranch=False):
1684 return exchange.push(self, remote, force, revs, newbranch)
1684 return exchange.push(self, remote, force, revs, newbranch)
1685
1685
1686 def changegroup(self, basenodes, source):
1687 # to avoid a race we use changegroupsubset() (issue1320)
1688 return changegroup.changegroupsubset(self, basenodes, self.heads(),
1689 source)
1690
1691 @unfilteredmethod
1686 @unfilteredmethod
1692 def addchangegroup(self, source, srctype, url, emptyok=False):
1687 def addchangegroup(self, source, srctype, url, emptyok=False):
1693 """Add the changegroup returned by source.read() to this repo.
1688 """Add the changegroup returned by source.read() to this repo.
@@ -578,7 +578,7 b' def capabilities(repo, proto):'
578 @wireprotocommand('changegroup', 'roots')
578 @wireprotocommand('changegroup', 'roots')
579 def changegroup(repo, proto, roots):
579 def changegroup(repo, proto, roots):
580 nodes = decodelist(roots)
580 nodes = decodelist(roots)
581 cg = repo.changegroup(nodes, 'serve')
581 cg = changegroupmod.changegroup(repo, nodes, 'serve')
582 return streamres(proto.groupchunks(cg))
582 return streamres(proto.groupchunks(cg))
583
583
584 @wireprotocommand('changegroupsubset', 'bases heads')
584 @wireprotocommand('changegroupsubset', 'bases heads')
General Comments 0
You need to be logged in to leave comments. Login now