##// END OF EJS Templates
localrepo: move the changegroupinfo method in changegroup module...
Pierre-Yves David -
r20926:7c1ed40e default
parent child Browse files
Show More
@@ -429,6 +429,14 b' class bundle10(object):'
429 # do nothing with basenode, it is implicitly the previous one in HG10
429 # do nothing with basenode, it is implicitly the previous one in HG10
430 return struct.pack(self.deltaheader, node, p1n, p2n, linknode)
430 return struct.pack(self.deltaheader, node, p1n, p2n, linknode)
431
431
432 def _changegroupinfo(repo, nodes, source):
433 if repo.ui.verbose or source == 'bundle':
434 repo.ui.status(_("%d changesets found\n") % len(nodes))
435 if repo.ui.debugflag:
436 repo.ui.debug("list of changesets:\n")
437 for node in nodes:
438 repo.ui.debug("%s\n" % hex(node))
439
432 def getsubset(repo, outgoing, bundler, source, fastpath=False):
440 def getsubset(repo, outgoing, bundler, source, fastpath=False):
433 repo = repo.unfiltered()
441 repo = repo.unfiltered()
434 commonrevs = outgoing.common
442 commonrevs = outgoing.common
@@ -442,6 +450,6 b' def getsubset(repo, outgoing, bundler, s'
442 repo.filtername is None and heads == sorted(repo.heads()))
450 repo.filtername is None and heads == sorted(repo.heads()))
443
451
444 repo.hook('preoutgoing', throw=True, source=source)
452 repo.hook('preoutgoing', throw=True, source=source)
445 repo.changegroupinfo(csets, source)
453 _changegroupinfo(repo, csets, source)
446 gengroup = bundler.generate(commonrevs, csets, fastpathlinkrev, source)
454 gengroup = bundler.generate(commonrevs, csets, fastpathlinkrev, source)
447 return unbundle10(util.chunkbuffer(gengroup), 'UN')
455 return unbundle10(util.chunkbuffer(gengroup), 'UN')
@@ -1683,14 +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 changegroupinfo(self, nodes, source):
1687 if self.ui.verbose or source == 'bundle':
1688 self.ui.status(_("%d changesets found\n") % len(nodes))
1689 if self.ui.debugflag:
1690 self.ui.debug("list of changesets:\n")
1691 for node in nodes:
1692 self.ui.debug("%s\n" % hex(node))
1693
1694 def changegroupsubset(self, roots, heads, source):
1686 def changegroupsubset(self, roots, heads, source):
1695 """Compute a changegroup consisting of all the nodes that are
1687 """Compute a changegroup consisting of all the nodes that are
1696 descendants of any of the roots and ancestors of any of the heads.
1688 descendants of any of the roots and ancestors of any of the heads.
General Comments 0
You need to be logged in to leave comments. Login now