Mercurial > hg
comparison mercurial/commands.py @ 15836:926c9ee8d4be
commands: make bundle use heads computed by findoutgoing
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Mon, 09 Jan 2012 04:16:00 +0100 |
parents | 65f7e986a0d0 |
children | cd956049fc14 |
comparison
equal
deleted
inserted
replaced
15835:fa15869bf95c | 15836:926c9ee8d4be |
---|---|
975 if base: | 975 if base: |
976 if dest: | 976 if dest: |
977 raise util.Abort(_("--base is incompatible with specifying " | 977 raise util.Abort(_("--base is incompatible with specifying " |
978 "a destination")) | 978 "a destination")) |
979 common = [repo.lookup(rev) for rev in base] | 979 common = [repo.lookup(rev) for rev in base] |
980 heads = revs and map(repo.lookup, revs) or revs | 980 outheads = revs and map(repo.lookup, revs) or revs |
981 else: | 981 else: |
982 dest = ui.expandpath(dest or 'default-push', dest or 'default') | 982 dest = ui.expandpath(dest or 'default-push', dest or 'default') |
983 dest, branches = hg.parseurl(dest, opts.get('branch')) | 983 dest, branches = hg.parseurl(dest, opts.get('branch')) |
984 other = hg.peer(repo, opts, dest) | 984 other = hg.peer(repo, opts, dest) |
985 revs, checkout = hg.addbranchrevs(repo, other, branches, revs) | 985 revs, checkout = hg.addbranchrevs(repo, other, branches, revs) |
986 heads = revs and map(repo.lookup, revs) or revs | 986 heads = revs and map(repo.lookup, revs) or revs |
987 common, outheads = discovery.findcommonoutgoing(repo, other, | 987 common, outheads = discovery.findcommonoutgoing(repo, other, |
988 onlyheads=heads, | 988 onlyheads=heads, |
989 force=opts.get('force')) | 989 force=opts.get('force')) |
990 | 990 |
991 cg = repo.getbundle('bundle', common=common, heads=heads) | 991 cg = repo.getbundle('bundle', common=common, heads=outheads) |
992 if not cg: | 992 if not cg: |
993 ui.status(_("no changes found\n")) | 993 ui.status(_("no changes found\n")) |
994 return 1 | 994 return 1 |
995 | 995 |
996 bundletype = opts.get('type', 'bzip2').lower() | 996 bundletype = opts.get('type', 'bzip2').lower() |