~bzr-pqm/bzr/bzr.dev

Viewing all changes in revision 2900.2.19.

  • Committer: Vincent Ladeuil
  • Date: 2007-10-23 08:51:09 UTC
  • mto: (2961.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 2962.
  • Revision ID: v.ladeuil+lp@free.fr-20071023085109-60tarfj3wg23yd2a
Mention proxy and https in the password prompts, with tests.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.get_password): Use our specific prompt
building to address proxy and https needs.
(AbstractAuthHandler._build_password_prompt): New method, helper
to build the prompt.
(HTTPAuthHandler.build_password_prompt): Default implementation is
ok.
(ProxyAuthHandler.build_password_prompt): Prefix with 'Proxy '.

* bzrlib/tests/test_http.py:
(TestAuth.test_prompt_for_password): Check the prompt too.

* bzrlib/tests/test_config.py:
(TestAuthenticationConfig.test_default_prompts): Delete HTTP tests
which need special handling.

* bzrlib/transport/http/_urllib2_wrappers.py:
(AbstractAuthHandler.build_password_prompt): New method to build
the prompt and mention the protocol sed (http or https).
(ProxyAuthHandler.build_password_prompt): Put proxy in front of
the prompt.

* bzrlib/config.py:
(AuthenticationConfig.get_password): Simplified by taking out http
specifics (which were not enough to address all the cases anyway).

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: