Mercurial > hg
comparison mercurial/bundlerepo.py @ 28666:ae53ecc47414
bundle: move writebundle() from changegroup.py to bundle2.py (API)
writebundle() writes a bundle2 bundle or a plain changegroup1. Imagine
away the "2" in "bundle2.py" for a moment and this change should makes
sense. The bundle wraps the changegroup, so it makes sense that it
knows about it. Another sign that this is correct is that the delayed
import of bundle2 in changegroup goes away.
I'll leave it for another time to remove the "2" in "bundle2.py"
(alternatively, extract a new bundle.py from it).
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Mon, 28 Mar 2016 14:41:29 -0700 |
parents | 7a8c44844f57 |
children | dac81729fea4 |
comparison
equal
deleted
inserted
replaced
28655:0e330d7d9f53 | 28666:ae53ecc47414 |
---|---|
492 cg = other.changegroupsubset(incoming, rheads, 'incoming') | 492 cg = other.changegroupsubset(incoming, rheads, 'incoming') |
493 if localrepo: | 493 if localrepo: |
494 bundletype = "HG10BZ" | 494 bundletype = "HG10BZ" |
495 else: | 495 else: |
496 bundletype = "HG10UN" | 496 bundletype = "HG10UN" |
497 fname = bundle = changegroup.writebundle(ui, cg, bundlename, | 497 fname = bundle = bundle2.writebundle(ui, cg, bundlename, |
498 bundletype) | 498 bundletype) |
499 # keep written bundle? | 499 # keep written bundle? |
500 if bundlename: | 500 if bundlename: |
501 bundle = None | 501 bundle = None |
502 if not localrepo: | 502 if not localrepo: |