Show More
@@ -480,3 +480,13 b' def changegroupsubset(repo, roots, heads' | |||
|
480 | 480 | bundler = bundle10(repo) |
|
481 | 481 | return getsubset(repo, outgoing, bundler, source) |
|
482 | 482 | |
|
483 | def getlocalbundle(repo, source, outgoing, bundlecaps=None): | |
|
484 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
|
485 | ||
|
486 | This is only implemented for local repos and reuses potentially | |
|
487 | precomputed sets in outgoing.""" | |
|
488 | if not outgoing.missing: | |
|
489 | return None | |
|
490 | bundler = bundle10(repo, bundlecaps) | |
|
491 | return getsubset(repo, outgoing, bundler, source) | |
|
492 |
@@ -1142,7 +1142,7 b' def bundle(ui, repo, fname, dest=None, *' | |||
|
1142 | 1142 | onlyheads=heads, |
|
1143 | 1143 | force=opts.get('force'), |
|
1144 | 1144 | portable=True) |
|
1145 |
cg = |
|
|
1145 | cg = changegroup.getlocalbundle(repo, 'bundle', outgoing, bundlecaps) | |
|
1146 | 1146 | if not cg: |
|
1147 | 1147 | scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) |
|
1148 | 1148 | return 1 |
@@ -187,7 +187,8 b' def _pushchangeset(pushop):' | |||
|
187 | 187 | 'push', |
|
188 | 188 | fastpath=True) |
|
189 | 189 | else: |
|
190 |
cg = pushop.repo |
|
|
190 | cg = changegroup.getlocalbundle(pushop.repo, 'push', outgoing, | |
|
191 | bundlecaps) | |
|
191 | 192 | |
|
192 | 193 | # apply changegroup to remote |
|
193 | 194 | if unbundle: |
@@ -1683,16 +1683,6 b' class localrepository(object):' | |||
|
1683 | 1683 | def push(self, remote, force=False, revs=None, newbranch=False): |
|
1684 | 1684 | return exchange.push(self, remote, force, revs, newbranch) |
|
1685 | 1685 | |
|
1686 | def getlocalbundle(self, source, outgoing, bundlecaps=None): | |
|
1687 | """Like getbundle, but taking a discovery.outgoing as an argument. | |
|
1688 | ||
|
1689 | This is only implemented for local repos and reuses potentially | |
|
1690 | precomputed sets in outgoing.""" | |
|
1691 | if not outgoing.missing: | |
|
1692 | return None | |
|
1693 | bundler = changegroup.bundle10(self, bundlecaps) | |
|
1694 | return changegroup.getsubset(self, outgoing, bundler, source) | |
|
1695 | ||
|
1696 | 1686 | def getbundle(self, source, heads=None, common=None, bundlecaps=None): |
|
1697 | 1687 | """Like changegroupsubset, but returns the set difference between the |
|
1698 | 1688 | ancestors of heads and the ancestors common. |
@@ -1710,8 +1700,8 b' class localrepository(object):' | |||
|
1710 | 1700 | common = [nullid] |
|
1711 | 1701 | if not heads: |
|
1712 | 1702 | heads = cl.heads() |
|
1713 | return self.getlocalbundle(source, | |
|
1714 | discovery.outgoing(cl, common, heads), | |
|
1703 | outgoing = discovery.outgoing(cl, common, heads) | |
|
1704 | return changegroup.getlocalbundle(self, source, outgoing, | |
|
1715 | 1705 | bundlecaps=bundlecaps) |
|
1716 | 1706 | |
|
1717 | 1707 | def changegroup(self, basenodes, source): |
General Comments 0
You need to be logged in to leave comments.
Login now