Details
Details
- Reviewers
yuja - Group Reviewers
hg-reviewers - Commits
- rHG60143d038eb7: wireproto: more strkwargs cleanup
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
( )
yuja |
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
heads = set(opts.get('heads', set())) | heads = set(opts.get('heads', set())) | ||||
common = set(opts.get('common', set())) | common = set(opts.get('common', set())) | ||||
common.discard(nullid) | common.discard(nullid) | ||||
if not common and clheads == heads: | if not common and clheads == heads: | ||||
raise error.Abort( | raise error.Abort( | ||||
_('server has pull-based clones disabled'), | _('server has pull-based clones disabled'), | ||||
hint=_('remove --pull if specified or upgrade Mercurial')) | hint=_('remove --pull if specified or upgrade Mercurial')) | ||||
chunks = exchange.getbundlechunks(repo, 'serve', **opts) | chunks = exchange.getbundlechunks(repo, 'serve', | ||||
**pycompat.strkwargs(opts)) | |||||
except error.Abort as exc: | except error.Abort as exc: | ||||
# cleanly forward Abort error to the client | # cleanly forward Abort error to the client | ||||
if not exchange.bundle2requested(opts.get('bundlecaps')): | if not exchange.bundle2requested(opts.get('bundlecaps')): | ||||
if proto.name == 'http': | if proto.name == 'http': | ||||
return ooberror(str(exc) + '\n') | return ooberror(str(exc) + '\n') | ||||
raise # cannot do better for bundle1 + ssh | raise # cannot do better for bundle1 + ssh | ||||
# bundle2 request expect a bundle2 reply | # bundle2 request expect a bundle2 reply | ||||
bundler = bundle2.bundle20(repo.ui) | bundler = bundle2.bundle20(repo.ui) |