Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 22390:e2806b8613ca
changegroup: rename bundle-related functions and classes
Functions like getbundle and classes like unbundle10 really manipulate
changegroups and not bundles. A HG10 bundle is the same as a changegroup
plus a small header, but this is no longer the case for a HG2X bundle,
so it's better to separate the names a bit.
author | Sune Foldager <cryo@cyanite.org> |
---|---|
date | Tue, 02 Sep 2014 12:11:36 +0200 |
parents | f58b41f6708b |
children | 6f63c47cbb86 |
comparison
equal
deleted
inserted
replaced
22389:94f77624dbb5 | 22390:e2806b8613ca |
---|---|
1157 if dest: | 1157 if dest: |
1158 raise util.Abort(_("--base is incompatible with specifying " | 1158 raise util.Abort(_("--base is incompatible with specifying " |
1159 "a destination")) | 1159 "a destination")) |
1160 common = [repo.lookup(rev) for rev in base] | 1160 common = [repo.lookup(rev) for rev in base] |
1161 heads = revs and map(repo.lookup, revs) or revs | 1161 heads = revs and map(repo.lookup, revs) or revs |
1162 cg = changegroup.getbundle(repo, 'bundle', heads=heads, common=common, | 1162 cg = changegroup.getchangegroup(repo, 'bundle', heads=heads, |
1163 bundlecaps=bundlecaps) | 1163 common=common, bundlecaps=bundlecaps) |
1164 outgoing = None | 1164 outgoing = None |
1165 else: | 1165 else: |
1166 dest = ui.expandpath(dest or 'default-push', dest or 'default') | 1166 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
1167 dest, branches = hg.parseurl(dest, opts.get('branch')) | 1167 dest, branches = hg.parseurl(dest, opts.get('branch')) |
1168 other = hg.peer(repo, opts, dest) | 1168 other = hg.peer(repo, opts, dest) |
1170 heads = revs and map(repo.lookup, revs) or revs | 1170 heads = revs and map(repo.lookup, revs) or revs |
1171 outgoing = discovery.findcommonoutgoing(repo, other, | 1171 outgoing = discovery.findcommonoutgoing(repo, other, |
1172 onlyheads=heads, | 1172 onlyheads=heads, |
1173 force=opts.get('force'), | 1173 force=opts.get('force'), |
1174 portable=True) | 1174 portable=True) |
1175 cg = changegroup.getlocalbundle(repo, 'bundle', outgoing, bundlecaps) | 1175 cg = changegroup.getlocalchangegroup(repo, 'bundle', outgoing, |
1176 bundlecaps) | |
1176 if not cg: | 1177 if not cg: |
1177 scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) | 1178 scmutil.nochangesfound(ui, repo, outgoing and outgoing.excluded) |
1178 return 1 | 1179 return 1 |
1179 | 1180 |
1180 changegroup.writebundle(cg, fname, bundletype) | 1181 changegroup.writebundle(cg, fname, bundletype) |