This makes the test run on Python 3.
- skip-blame because just b'' prefixes.
| hg-reviewers |
This makes the test run on Python 3.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | contrib/python3-whitelist (1 line) | |||
| M | tests/test-bundle2-pushback.t (16 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| Pulkit Goyal | Jun 25 2018, 3:38 PM |
| test-branch-change.t | test-branch-change.t | ||||
| test-branch-option.t | test-branch-option.t | ||||
| test-branch-tag-confict.t | test-branch-tag-confict.t | ||||
| test-branches.t | test-branches.t | ||||
| test-bundle-phases.t | test-bundle-phases.t | ||||
| test-bundle-type.t | test-bundle-type.t | ||||
| test-bundle-vs-outgoing.t | test-bundle-vs-outgoing.t | ||||
| test-bundle2-multiple-changegroups.t | test-bundle2-multiple-changegroups.t | ||||
| test-bundle2-pushback.t | |||||
| test-cappedreader.py | test-cappedreader.py | ||||
| test-casecollision.t | test-casecollision.t | ||||
| test-cat.t | test-cat.t | ||||
| test-cbor.py | test-cbor.py | ||||
| test-censor.t | test-censor.t | ||||
| test-changelog-exec.t | test-changelog-exec.t | ||||
| test-check-commit.t | test-check-commit.t | ||||
| test-check-execute.t | test-check-execute.t | ||||
| > """ | > """ | ||||
| > from __future__ import absolute_import | > from __future__ import absolute_import | ||||
| > from mercurial import bundle2, exchange, pushkey, util | > from mercurial import bundle2, exchange, pushkey, util | ||||
| > def _newhandlechangegroup(op, inpart): | > def _newhandlechangegroup(op, inpart): | ||||
| > """This function wraps the changegroup part handler for getbundle. | > """This function wraps the changegroup part handler for getbundle. | ||||
| > It issues an additional pushkey part to send a new | > It issues an additional pushkey part to send a new | ||||
| > bookmark back to the client""" | > bookmark back to the client""" | ||||
| > result = bundle2.handlechangegroup(op, inpart) | > result = bundle2.handlechangegroup(op, inpart) | ||||
| > if 'pushback' in op.reply.capabilities: | > if b'pushback' in op.reply.capabilities: | ||||
| > params = {'namespace': 'bookmarks', | > params = {b'namespace': b'bookmarks', | ||||
| > 'key': 'new-server-mark', | > b'key': b'new-server-mark', | ||||
| > 'old': '', | > b'old': b'', | ||||
| > 'new': 'tip'} | > b'new': b'tip'} | ||||
| > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] | > encodedparams = [(k, pushkey.encode(v)) for (k,v) in params.items()] | ||||
| > op.reply.newpart('pushkey', mandatoryparams=encodedparams) | > op.reply.newpart(b'pushkey', mandatoryparams=encodedparams) | ||||
| > else: | > else: | ||||
| > op.reply.newpart('output', data='pushback not enabled') | > op.reply.newpart(b'output', data=b'pushback not enabled') | ||||
| > return result | > return result | ||||
| > _newhandlechangegroup.params = bundle2.handlechangegroup.params | > _newhandlechangegroup.params = bundle2.handlechangegroup.params | ||||
| > bundle2.parthandlermapping['changegroup'] = _newhandlechangegroup | > bundle2.parthandlermapping[b'changegroup'] = _newhandlechangegroup | ||||
| > EOF | > EOF | ||||
| $ cat >> $HGRCPATH <<EOF | $ cat >> $HGRCPATH <<EOF | ||||
| > [ui] | > [ui] | ||||
| > ssh = $PYTHON "$TESTDIR/dummyssh" | > ssh = $PYTHON "$TESTDIR/dummyssh" | ||||
| > username = nobody <no.reply@example.com> | > username = nobody <no.reply@example.com> | ||||
| > | > | ||||
| > [alias] | > [alias] | ||||