Rev 4284: (Jelmer) Prompt for user names for http if they are not in the in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Fri Apr 10 20:37:26 BST 2009
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 4284
revision-id: pqm at pqm.ubuntu.com-20090410193720-nyej7ft1k2yoyhui
parent: pqm at pqm.ubuntu.com-20090410130227-fh2zl04tu0oq6cg6
parent: jelmer at samba.org-20090410183552-ombi47cattksafz8
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2009-04-10 20:37:20 +0100
message:
(Jelmer) Prompt for user names for http if they are not in the
configuration.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
bzrlib/smtp_connection.py smtp_connection.py-20070618204456-nu6wag1ste4biuk2-1
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_ftp_transport.py test_aftp_transport.-20060823221619-98mwjzxtwtkt527k-1
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
bzrlib/transport/ftp/__init__.py ftp.py-20051116161804-58dc9506548c2a53
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/ssh.py ssh.py-20060824042150-0s9787kng6zv1nwq-1
bzrlib/ui/text.py text.py-20051130153916-2e438cffc8afc478
------------------------------------------------------------
revno: 4222.3.15
revision-id: jelmer at samba.org-20090410183552-ombi47cattksafz8
parent: jelmer at samba.org-20090410155809-kdibzcjvp7pdb83f
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Fri 2009-04-10 20:35:52 +0200
message:
Fix launchpad username prompting in a similar way to smtp.
modified:
bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
------------------------------------------------------------
revno: 4222.3.14
revision-id: jelmer at samba.org-20090410155809-kdibzcjvp7pdb83f
parent: jelmer at samba.org-20090409202204-0gysnr2xzd7djkuz
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Fri 2009-04-10 17:58:09 +0200
message:
Fix missing import.
modified:
bzrlib/tests/test_ftp_transport.py test_aftp_transport.-20060823221619-98mwjzxtwtkt527k-1
------------------------------------------------------------
revno: 4222.3.13
revision-id: jelmer at samba.org-20090409202204-0gysnr2xzd7djkuz
parent: jelmer at samba.org-20090409200447-pvh1a8p908zj7vjm
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Thu 2009-04-09 22:22:04 +0200
message:
Add tests to ensure sftp and ftp don't prompt for usernames.
modified:
bzrlib/tests/test_ftp_transport.py test_aftp_transport.-20060823221619-98mwjzxtwtkt527k-1
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
------------------------------------------------------------
revno: 4222.3.12
revision-id: jelmer at samba.org-20090409200447-pvh1a8p908zj7vjm
parent: jelmer at samba.org-20090407152822-5e9v7gnzg04e4oxq
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Thu 2009-04-09 22:04:47 +0200
message:
Check that the HTTP transport prompts for usernames.
modified:
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
------------------------------------------------------------
revno: 4222.3.11
revision-id: jelmer at samba.org-20090407152822-5e9v7gnzg04e4oxq
parent: jelmer at samba.org-20090407140352-0u5q1uqfbltf6b03
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-04-07 17:28:22 +0200
message:
Add test to make sure the default= parameter works.
modified:
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
------------------------------------------------------------
revno: 4222.3.10
revision-id: jelmer at samba.org-20090407140352-0u5q1uqfbltf6b03
parent: jelmer at samba.org-20090407133556-6iutwwzcqwc0ebjd
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-04-07 16:03:52 +0200
message:
Avoid using the default username in the case of SMTP.
modified:
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/smtp_connection.py smtp_connection.py-20070618204456-nu6wag1ste4biuk2-1
------------------------------------------------------------
revno: 4222.3.9
revision-id: jelmer at samba.org-20090407133556-6iutwwzcqwc0ebjd
parent: jelmer at samba.org-20090407125804-e6f2474545vpi8oh
parent: pqm at pqm.ubuntu.com-20090407130821-e4wi39x60alhpnr4
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-04-07 15:35:56 +0200
message:
merge bzr.dev.
added:
bzrlib/_chk_map_py.py _chk_map_py.py-20090309114220-1kurz7oez2gwqtcf-1
bzrlib/_chk_map_pyx.pyx _chk_map_pyx.pyx-20090309111231-peyz7p2azr0dzdrb-1
bzrlib/_groupcompress_py.py _groupcompress_py.py-20090324110021-j63s399f4icrgw4p-1
bzrlib/_groupcompress_pyx.pyx _groupcompress_c.pyx-20080724041824-yelg6ii7c7zxt4z0-1
bzrlib/chk_map.py chk_map.py-20081001014447-ue6kkuhofvdecvxa-1
bzrlib/chk_serializer.py chk_serializer.py-20081002064345-2tofdfj2eqq01h4b-1
bzrlib/delta.h delta.h-20090227173129-qsu3u43vowf1q3ay-1
bzrlib/diff-delta.c diffdelta.c-20090226042143-l9wzxynyuxnb5hus-1
bzrlib/groupcompress.py groupcompress.py-20080705181503-ccbxd6xuy1bdnrpu-8
bzrlib/serializer.py serializer.py-20090402143702-wmkh9cfjhwpju0qi-1
bzrlib/tests/bzrdir_implementations/test_push.py test_push.py-20090403142358-xnn0wtsk3gx238ot-1
bzrlib/tests/test__chk_map.py test__chk_map.py-20090309114220-1kurz7oez2gwqtcf-2
bzrlib/tests/test__groupcompress.py test__groupcompress_-20080724145854-koifwb7749cfzrvj-1
bzrlib/tests/test_chk_map.py test_chk_map.py-20081001014447-ue6kkuhofvdecvxa-2
bzrlib/tests/test_groupcompress.py test_groupcompress.p-20080705181503-ccbxd6xuy1bdnrpu-13
bzrlib/tests/test_serializer.py test_serializer.py-20090403213933-q6x117y8t9fbeyoz-1
modified:
.bzrignore bzrignore-20050311232317-81f7b71efa2db11a
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/add.py add.py-20050323030017-3a77d63feda58e33
bzrlib/annotate.py annotate.py-20050922133147-7c60541d2614f022
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/btree_index.py index.py-20080624222253-p0x5f92uyh5hw734-7
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/dirstate.py dirstate.py-20060728012006-d6mvoihjb3je9peu-1
bzrlib/filters/__init__.py __init__.py-20080416080515-mkxl29amuwrf6uir-2
bzrlib/filters/eol.py eol.py-20090327060429-todzdjmqt3bpv5r8-1
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
bzrlib/hooks.py hooks.py-20070325015548-ix4np2q0kd8452au-1
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/merge.py merge.py-20050513021216-953b65a438527106
bzrlib/multiparent.py __init__.py-20070410133617-n1jdhcc1n1mibarp-1
bzrlib/pack.py container.py-20070607160755-tr8zc26q18rn0jnb-1
bzrlib/push.py push.py-20080606021927-5fe39050e8xne9un-1
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/revision.py revision.py-20050309040759-e77802c08f3999d5
bzrlib/revisiontree.py revisiontree.py-20060724012533-bg8xyryhxd0o0i0h-1
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/smart/bzrdir.py bzrdir.py-20061122024551-ol0l0o0oofsu9b3t-1
bzrlib/smart/medium.py medium.py-20061103051856-rgu2huy59fkz902q-1
bzrlib/smart/request.py request.py-20061108095550-gunadhxmzkdjfeek-1
bzrlib/smart/server.py server.py-20061110062051-chzu10y32vx8gvur-1
bzrlib/symbol_versioning.py symbol_versioning.py-20060105104851-9ecf8af605d15a80
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
bzrlib/tests/blackbox/test_uncommit.py test_uncommit.py-20051027212835-84944b63adae51be
bzrlib/tests/branch_implementations/test_break_lock.py test_break_lock.py-20060504111902-9aae411dbe9aadd2
bzrlib/tests/bzrdir_implementations/__init__.py __init__.py-20060131065642-34c39b54f42dd048
bzrlib/tests/intertree_implementations/__init__.py __init__.py-20060724101752-09ysswo1a92uqyoz-3
bzrlib/tests/intertree_implementations/test_compare.py test_compare.py-20060724101752-09ysswo1a92uqyoz-2
bzrlib/tests/inventory_implementations/basics.py basics.py-20070903044446-kdjwbiu1p1zi9phs-1
bzrlib/tests/per_repository/test_repository.py test_repository.py-20060131092128-ad07f494f5c9d26c
bzrlib/tests/test_filters.py test_filters.py-20080417120614-tc3zok0vvvprsc99-1
bzrlib/tests/test_hooks.py test_hooks.py-20070628030849-89rtsbe5dmer5npz-1
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_inv.py testinv.py-20050722220913-1dc326138d1a5892
bzrlib/tests/test_lockable_files.py test_lockable_files.py-20051225183927-365c7fd99591caf1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/test_smart_transport.py test_ssh_transport.py-20060608202016-c25gvf1ob7ypbus6-2
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/tests/test_version_info.py test_version_info.py-20051228204928-2c364e30b702b41b
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/tests/test_xml.py test_xml.py-20050905091053-80b45588931a9b35
bzrlib/tests/workingtree_implementations/test_read_working_inventory.py test_read_working_in-20061005073432-585uyj0sua6r7i9v-2
bzrlib/version_info_formats/format_custom.py format_custom.py-20071029100350-ajovqhbpb5khf6gu-1
bzrlib/version_info_formats/format_python.py format_python.py-20060809202444-ike7i9ub03gb432p-1
bzrlib/version_info_formats/format_rio.py format_rio.py-20060809202444-ike7i9ub03gb432p-2
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/win32utils.py win32console.py-20051021033308-123c6c929d04973d
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/xml4.py xml4.py-20050916091259-db5ab55e7e6ca324
bzrlib/xml5.py xml5.py-20080328030717-t9guwinq8hom0ar3-1
bzrlib/xml8.py xml5.py-20050907032657-aac8f960815b66b1
bzrlib/xml_serializer.py xml.py-20050309040759-57d51586fdec365d
doc/developers/container-format.txt containerformat.txt-20070601074309-7n7w1jiyayud6xdn-1
doc/developers/incremental-push-pull.txt incrementalpushpull.-20070508045640-zneiu1yzbci574c6-1
doc/developers/inventory.txt inventory.txt-20080103013957-opkrhxy6lmywmx4i-1
doc/developers/lca-merge.txt lcamerge.txt-20080103061803-9isydn4ivgwrvorw-1
doc/developers/merge-scaling.txt mergescaling.rst-20070527173558-rqaqxn1al7vzgcto-2
doc/developers/network-protocol.txt networkprotocol.txt-20070903044232-woustorrjbmg5zol-1
doc/developers/planned-performance-changes.txt plannedperformancech-20070604053752-bnjdhako613xfufb-1
doc/en/user-guide/releasing_a_project.txt releasing_a_project.-20071121073725-0corxykv5irjal00-5
doc/en/user-guide/server.txt server.txt-20060913044801-h939fvbwzz39gf7g-1
doc/en/user-guide/specifying_revisions.txt specifying_revisions.txt-20060314161707-19deb139101bea33
doc/en/user-guide/svn_plugin.txt svn_plugin.txt-20080509065016-cjc90f46407vi9a0-2
setup.py setup.py-20050314065409-02f8a0a6e3f9bc70
------------------------------------------------------------
revno: 4222.3.8
revision-id: jelmer at samba.org-20090407125804-e6f2474545vpi8oh
parent: jelmer at samba.org-20090407115404-hyi0ky5adtshx5q9
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-04-07 14:58:04 +0200
message:
Test that for sftp and ssh getpass.getuser() is returned by AuthenticationConfig.get_user() rather than None.
modified:
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_sftp_transport.py testsftp.py-20051027032739-247570325fec7e7e
------------------------------------------------------------
revno: 4222.3.7
revision-id: jelmer at samba.org-20090407115404-hyi0ky5adtshx5q9
parent: jelmer at samba.org-20090403173643-xcf89aq1bn3yxipt
parent: jelmer at samba.org-20090407115105-r7tx90v1ejqijf6y
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-04-07 13:54:04 +0200
message:
merge new ui-username work.
modified:
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 4222.3.6
revision-id: jelmer at samba.org-20090403173643-xcf89aq1bn3yxipt
parent: jelmer at samba.org-20090403171730-syeaequ5tsr2qw6t
parent: jelmer at samba.org-20090403171939-1hnkorkxf633uyn5
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Fri 2009-04-03 19:36:43 +0200
message:
Merge new username ui call.
removed:
bzrlib/tests/blackbox/test_guess_renames.py test_guess_renames.p-20090312063936-bqdtxr0r3md3jc00-1
added:
bzrlib/filters/eol.py eol.py-20090327060429-todzdjmqt3bpv5r8-1
bzrlib/help_topics/en/eol.txt eol.txt-20090327060429-todzdjmqt3bpv5r8-3
bzrlib/inventory_delta.py journalled_inventory-20080103020931-0ht5n40kwc0p7fy1-1
bzrlib/tests/test_eol_filters.py test_eol_filters.py-20090327060429-todzdjmqt3bpv5r8-2
bzrlib/tests/test_inventory_delta.py test_journalled_inv.-20080103012121-ny2w9slze5jgty8i-1
bzrlib/tests/workingtree_implementations/test_eol_conversion.py test_eol_conversion.-20090327060429-todzdjmqt3bpv5r8-4
doc/developers/groupcompress-design.txt design-20080705181503-ccbxd6xuy1bdnrpu-2
modified:
.bzrignore bzrignore-20050311232317-81f7b71efa2db11a
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/__init__.py __init__.py-20050309040759-33e65acf91bbcd5d
bzrlib/branch.py branch.py-20050309040759-e4baf4e0d046576e
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/bundle/serializer/v4.py v10.py-20070611062757-5ggj7k18s9dej0fr-1
bzrlib/bzrdir.py bzrdir.py-20060131065624-156dfea39c4387cb
bzrlib/commit.py commit.py-20050511101309-79ec1a0168e0e825
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/errors.py errors.py-20050309040759-20512168c4e14fbd
bzrlib/graph.py graph_walker.py-20070525030359-y852guab65d4wtn0-1
bzrlib/help_topics/__init__.py help_topics.py-20060920210027-rnim90q9e0bwxvy4-1
bzrlib/help_topics/en/rules.txt rules.txt-20080516063844-ghr5l6pvvrhiycun-1
bzrlib/inventory.py inventory.py-20050309040759-6648b84ca2005b37
bzrlib/knit.py knit.py-20051212171256-f056ac8f0fbe1bd9
bzrlib/memorytree.py memorytree.py-20060906023413-4wlkalbdpsxi2r4y-1
bzrlib/mutabletree.py mutabletree.py-20060906023413-4wlkalbdpsxi2r4y-2
bzrlib/osutils.py osutils.py-20050309040759-eeaff12fbf77ac86
bzrlib/reconcile.py reweave_inventory.py-20051108164726-1e5e0934febac06e
bzrlib/remote.py remote.py-20060720103555-yeeg2x51vn0rbtdp-1
bzrlib/rename_map.py rename_map.py-20090312140439-xexkkmjlg2enbohc-1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
bzrlib/repofmt/pack_repo.py pack_repo.py-20070813041115-gjv5ma7ktfqwsjgn-1
bzrlib/repofmt/weaverepo.py presplitout.py-20070125045333-wfav3tsh73oxu3zk-1
bzrlib/repository.py rev_storage.py-20051111201905-119e9401e46257e3
bzrlib/smart/branch.py branch.py-20061124031907-mzh3pla28r83r97f-1
bzrlib/tests/__init__.py selftest.py-20050531073622-8d0e3c8845c97a64
bzrlib/tests/blackbox/__init__.py __init__.py-20051128053524-eba30d8255e08dc3
bzrlib/tests/blackbox/test_add.py test_add.py-20060518072250-857e4f86f54a30b2
bzrlib/tests/blackbox/test_branch.py test_branch.py-20060524161337-noms9gmcwqqrfi8y-1
bzrlib/tests/blackbox/test_filtered_view_ops.py test_filtered_view_o-20081110012645-5t7ogtola0l33lkg-1
bzrlib/tests/blackbox/test_mv.py test_mv.py-20060705114902-33tkxz0o9cdshemo-1
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
bzrlib/tests/blackbox/test_view.py test_view.py-20080731135100-66o8o32heop7augi-1
bzrlib/tests/per_repository/test_add_inventory_by_delta.py test_add_inventory_d-20081013002626-rut81igtlqb4590z-1
bzrlib/tests/per_repository/test_check.py test_check.py-20070824124512-38g4d135gcqxo4zb-1
bzrlib/tests/per_repository/test_commit_builder.py test_commit_builder.py-20060606110838-76e3ra5slucqus81-1
bzrlib/tests/per_repository_reference/test_add_inventory.py test_add_inventory.p-20080220025549-nnm2s80it1lvcwnc-3
bzrlib/tests/per_repository_reference/test_add_revision.py test_add_revision.py-20080220034108-ao1u8qgakqbo5a08-1
bzrlib/tests/per_repository_reference/test_add_signature_text.py test_add_signature_t-20080220041905-1j2g4lyz3c6h34v4-1
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
bzrlib/tests/test_http.py testhttp.py-20051018020158-b2eef6e867c514d9
bzrlib/tests/test_info.py test_info.py-20070320150933-m0xxm1g7xi9v6noe-1
bzrlib/tests/test_remote.py test_remote.py-20060720103555-yeeg2x51vn0rbtdp-2
bzrlib/tests/test_rename_map.py test_rename_map.py-20090312140439-xexkkmjlg2enbohc-2
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/tests/test_versionedfile.py test_versionedfile.py-20060222045249-db45c9ed14a1c2e5
bzrlib/tests/workingtree_implementations/__init__.py __init__.py-20060203003124-b2aa5aca21a8bfad
bzrlib/transform.py transform.py-20060105172343-dd99e54394d91687
bzrlib/tree.py tree.py-20050309040759-9d5f2496be663e77
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
bzrlib/ui/text.py text.py-20051130153916-2e438cffc8afc478
bzrlib/versionedfile.py versionedfile.py-20060222045106-5039c71ee3b65490
bzrlib/weave.py knit.py-20050627021749-759c29984154256b
bzrlib/workingtree.py workingtree.py-20050511021032-29b6ec0a681e02e3
bzrlib/workingtree_4.py workingtree_4.py-20070208044105-5fgpc5j3ljlh5q6c-1
bzrlib/xml_serializer.py xml.py-20050309040759-57d51586fdec365d
doc/developers/development-repo.txt developmentrepo.txt-20080102200205-raj42k61dch8pjmj-1
doc/developers/index.txt index.txt-20070508041241-qznziunkg0nffhiw-1
doc/developers/inventory.txt inventory.txt-20080103013957-opkrhxy6lmywmx4i-1
doc/en/user-guide/filtered_views.txt filtered_views.txt-20090226100856-a16ba1v97v91ru58-1
tools/win32/build_release.py build_release.py-20081105204355-2ghh5cv01v1x4rzz-1
------------------------------------------------------------
revno: 4222.3.5
revision-id: jelmer at samba.org-20090403171730-syeaequ5tsr2qw6t
parent: jelmer at samba.org-20090402152649-9h9yomosan3nbeuj
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Fri 2009-04-03 19:17:30 +0200
message:
Fix test.
modified:
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
------------------------------------------------------------
revno: 4222.3.4
revision-id: jelmer at samba.org-20090402152649-9h9yomosan3nbeuj
parent: jelmer at samba.org-20090401171753-x2ywvnjqaxorhcmo
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Thu 2009-04-02 17:26:49 +0200
message:
Default to getpass.getuser() in AuthenticationConfig.get_user(), but allow
caller to request that the user be prompted.
modified:
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/transport/ftp/__init__.py ftp.py-20051116161804-58dc9506548c2a53
bzrlib/transport/http/_urllib2_wrappers.py _urllib2_wrappers.py-20060913231729-ha9ugi48ktx481ao-1
bzrlib/transport/ssh.py ssh.py-20060824042150-0s9787kng6zv1nwq-1
bzrlib/ui/text.py text.py-20051130153916-2e438cffc8afc478
------------------------------------------------------------
revno: 4222.3.3
revision-id: jelmer at samba.org-20090401171753-x2ywvnjqaxorhcmo
parent: jelmer at samba.org-20090331142201-z9fdaw12o139ax4m
parent: jelmer at samba.org-20090401171603-3cdysi1kd8kczhgl
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Wed 2009-04-01 19:17:53 +0200
message:
Merge ui-username patch.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/tests/test_ui.py test_ui.py-20051130162854-458e667a7414af09
bzrlib/ui/__init__.py ui.py-20050824083933-8cf663c763ba53a9
------------------------------------------------------------
revno: 4222.3.2
revision-id: jelmer at samba.org-20090331142201-z9fdaw12o139ax4m
parent: jelmer at samba.org-20090331141000-8c3su8blcdoxeh3h
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-03-31 16:22:01 +0200
message:
Prompt for user names if they are not in the configuration.
modified:
NEWS NEWS-20050323055033-4e00b5db738777ff
bzrlib/config.py config.py-20051011043216-070c74f4e9e338e8
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
------------------------------------------------------------
revno: 4222.3.1
revision-id: jelmer at samba.org-20090331141000-8c3su8blcdoxeh3h
parent: jelmer at samba.org-20090331135833-fpo4w8n5tco13z81
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: username
timestamp: Tue 2009-03-31 16:10:00 +0200
message:
Mention password when checking default prompt.
modified:
bzrlib/tests/test_config.py testconfig.py-20051011041908-742d0c15d8d8c8eb
=== modified file 'NEWS'
--- a/NEWS 2009-04-09 23:12:55 +0000
+++ b/NEWS 2009-04-10 19:37:20 +0000
@@ -157,6 +157,9 @@
* Progress bars now show the rate of network activity for
``bzr+ssh://`` and ``bzr://`` connections. (Andrew Bennetts)
+* Prompt for user names if they are not in the configuration.
+ (Jelmer Vernooij, #256612)
+
* Pushing to a stacked pack-format branch on a 1.12 or older smart server
now takes many less round trips. (Andrew Bennetts, Robert Collins,
#294479)
=== modified file 'bzrlib/config.py'
--- a/bzrlib/config.py 2009-04-02 03:37:30 +0000
+++ b/bzrlib/config.py 2009-04-07 14:03:52 +0000
@@ -1126,8 +1126,8 @@
config.update({name: values})
self._save()
- def get_user(self, scheme, host, port=None,
- realm=None, path=None, prompt=None):
+ def get_user(self, scheme, host, port=None, realm=None, path=None,
+ prompt=None, ask=False, default=None):
"""Get a user from authentication file.
:param scheme: protocol
@@ -1140,6 +1140,9 @@
:param path: the absolute path on the server (optional)
+ :param ask: Ask the user if there is no explicitly configured username
+ (optional)
+
:return: The found user.
"""
credentials = self.get_credentials(scheme, host, port, user=None,
@@ -1148,6 +1151,22 @@
user = credentials['user']
else:
user = None
+ if user is None:
+ if ask:
+ if prompt is None:
+ # Create a default prompt suitable for most cases
+ prompt = scheme.upper() + ' %(host)s username'
+ # Special handling for optional fields in the prompt
+ if port is not None:
+ prompt_host = '%s:%d' % (host, port)
+ else:
+ prompt_host = host
+ user = ui.ui_factory.get_username(prompt, host=prompt_host)
+ else:
+ if default is None:
+ import getpass
+ default = getpass.getuser()
+ user = default
return user
def get_password(self, scheme, host, user, port=None,
=== modified file 'bzrlib/plugins/launchpad/account.py'
--- a/bzrlib/plugins/launchpad/account.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/plugins/launchpad/account.py 2009-04-10 18:35:52 +0000
@@ -80,7 +80,10 @@
def _get_auth_user(auth=None):
if auth is None:
auth = AuthenticationConfig()
- return auth.get_user('ssh', '.launchpad.net')
+ username = auth.get_user('ssh', '.launchpad.net', default="")
+ if username == "":
+ username = None
+ return username
def _set_auth_user(username, auth=None):
if auth is None:
=== modified file 'bzrlib/smtp_connection.py'
--- a/bzrlib/smtp_connection.py 2009-03-25 18:43:31 +0000
+++ b/bzrlib/smtp_connection.py 2009-04-07 14:03:52 +0000
@@ -64,6 +64,9 @@
return
self._create_connection()
+ # FIXME: _authenticate() should only be called when the server has
+ # refused unauthenticated access, so it can safely try to authenticate
+ # with the default username. JRV20090407
self._authenticate()
def _create_connection(self):
@@ -103,8 +106,12 @@
"""If necessary authenticate yourself to the server."""
auth = config.AuthenticationConfig()
if self._smtp_username is None:
- self._smtp_username = auth.get_user('smtp', self._smtp_server)
- if self._smtp_username is None:
+ # FIXME: Since _authenticate gets called even when no authentication
+ # is necessary, it's not possible to use the default username
+ # here yet.
+ self._smtp_username = auth.get_user('smtp', self._smtp_server,
+ default="")
+ if self._smtp_username == "":
return
if self._smtp_password is None:
=== modified file 'bzrlib/tests/test_config.py'
--- a/bzrlib/tests/test_config.py 2009-04-02 05:05:17 +0000
+++ b/bzrlib/tests/test_config.py 2009-04-07 15:28:22 +0000
@@ -18,6 +18,7 @@
"""Tests for finding and reading the bzr config file[s]."""
# import system imports here
from cStringIO import StringIO
+import getpass
import os
import sys
@@ -1459,7 +1460,7 @@
class TestAuthenticationConfig(tests.TestCase):
"""Test AuthenticationConfig behaviour"""
- def _check_default_prompt(self, expected_prompt_format, scheme,
+ def _check_default_password_prompt(self, expected_prompt_format, scheme,
host=None, port=None, realm=None, path=None):
if host is None:
host = 'bar.org'
@@ -1478,23 +1479,55 @@
realm=realm, path=path))
self.assertEquals(stdout.getvalue(), expected_prompt)
- def test_default_prompts(self):
- # HTTP prompts can't be tested here, see test_http.py
- self._check_default_prompt('FTP %(user)s@%(host)s password: ', 'ftp')
- self._check_default_prompt('FTP %(user)s@%(host)s:%(port)d password: ',
- 'ftp', port=10020)
-
- self._check_default_prompt('SSH %(user)s@%(host)s:%(port)d password: ',
- 'ssh', port=12345)
+ def _check_default_username_prompt(self, expected_prompt_format, scheme,
+ host=None, port=None, realm=None, path=None):
+ if host is None:
+ host = 'bar.org'
+ username = 'jim'
+ expected_prompt = expected_prompt_format % {
+ 'scheme': scheme, 'host': host, 'port': port,
+ 'realm': realm}
+ stdout = tests.StringIOWrapper()
+ ui.ui_factory = tests.TestUIFactory(stdin=username+ '\n',
+ stdout=stdout)
+ # We use an empty conf so that the user is always prompted
+ conf = config.AuthenticationConfig()
+ self.assertEquals(username, conf.get_user(scheme, host, port=port,
+ realm=realm, path=path, ask=True))
+ self.assertEquals(stdout.getvalue(), expected_prompt)
+
+ def test_username_defaults_prompts(self):
+ # HTTP prompts can't be tested here, see test_http.py
+ self._check_default_username_prompt('FTP %(host)s username: ', 'ftp')
+ self._check_default_username_prompt(
+ 'FTP %(host)s:%(port)d username: ', 'ftp', port=10020)
+ self._check_default_username_prompt(
+ 'SSH %(host)s:%(port)d username: ', 'ssh', port=12345)
+
+ def test_username_default_no_prompt(self):
+ conf = config.AuthenticationConfig()
+ self.assertEquals(getpass.getuser(),
+ conf.get_user('ftp', 'example.com'))
+ self.assertEquals("explicitdefault",
+ conf.get_user('ftp', 'example.com', default="explicitdefault"))
+
+ def test_password_default_prompts(self):
+ # HTTP prompts can't be tested here, see test_http.py
+ self._check_default_password_prompt(
+ 'FTP %(user)s@%(host)s password: ', 'ftp')
+ self._check_default_password_prompt(
+ 'FTP %(user)s@%(host)s:%(port)d password: ', 'ftp', port=10020)
+ self._check_default_password_prompt(
+ 'SSH %(user)s@%(host)s:%(port)d password: ', 'ssh', port=12345)
# SMTP port handling is a bit special (it's handled if embedded in the
# host too)
# FIXME: should we: forbid that, extend it to other schemes, leave
# things as they are that's fine thank you ?
- self._check_default_prompt('SMTP %(user)s@%(host)s password: ',
+ self._check_default_password_prompt('SMTP %(user)s@%(host)s password: ',
'smtp')
- self._check_default_prompt('SMTP %(user)s@%(host)s password: ',
+ self._check_default_password_prompt('SMTP %(user)s@%(host)s password: ',
'smtp', host='bar.org:10025')
- self._check_default_prompt(
+ self._check_default_password_prompt(
'SMTP %(user)s@%(host)s:%(port)d password: ',
'smtp', port=10025)
=== modified file 'bzrlib/tests/test_ftp_transport.py'
--- a/bzrlib/tests/test_ftp_transport.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_ftp_transport.py 2009-04-10 15:58:09 +0000
@@ -15,6 +15,7 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
from cStringIO import StringIO
+import getpass
import sys
from bzrlib import (
@@ -84,6 +85,19 @@
scheme, self.user, self.password, host, port, path)
return url
+ def test_no_prompt_for_username(self):
+ """ensure getpass.getuser() is used if there's no username in the
+ configuration.""",
+ self.get_server().add_user(getpass.getuser(), self.password)
+ t = self.get_transport()
+ ui.ui_factory = tests.TestUIFactory(stdin=self.password + '\n',
+ stdout=tests.StringIOWrapper())
+ # Issue a request to the server to connect
+ t.put_bytes('foo', 'test bytes\n')
+ self.assertEqual('test bytes\n', t.get_bytes('foo'))
+ # Only the password should've been read
+ self.assertEqual('', ui.ui_factory.stdin.readline())
+
def test_prompt_for_password(self):
t = self.get_transport()
ui.ui_factory = tests.TestUIFactory(stdin=self.password+'\n',
=== modified file 'bzrlib/tests/test_http.py'
--- a/bzrlib/tests/test_http.py 2009-04-04 02:50:01 +0000
+++ b/bzrlib/tests/test_http.py 2009-04-09 20:04:47 +0000
@@ -1440,6 +1440,7 @@
_auth_header = 'Authorization'
_password_prompt_prefix = ''
+ _username_prompt_prefix = ''
def setUp(self):
super(TestAuth, self).setUp()
@@ -1514,6 +1515,25 @@
# initial 'who are you' and 'this is not you, who are you')
self.assertEqual(2, self.server.auth_required_errors)
+ def test_prompt_for_username(self):
+ if self._testing_pycurl():
+ raise tests.TestNotApplicable(
+ 'pycurl cannot prompt, it handles auth by embedding'
+ ' user:pass in urls only')
+
+ self.server.add_user('joe', 'foo')
+ t = self.get_user_transport(None, None)
+ stdout = tests.StringIOWrapper()
+ ui.ui_factory = tests.TestUIFactory(stdin='joe\nfoo\n', stdout=stdout)
+ self.assertEqual('contents of a\n',t.get('a').read())
+ # stdin should be empty
+ self.assertEqual('', ui.ui_factory.stdin.readline())
+ stdout.seek(0)
+ expected_prompt = self._expected_username_prompt(t._unqualified_scheme)
+ self.assertEquals(expected_prompt, stdout.read(len(expected_prompt)))
+ self._check_password_prompt(t._unqualified_scheme, 'joe',
+ stdout.readline())
+
def test_prompt_for_password(self):
if self._testing_pycurl():
raise tests.TestNotApplicable(
@@ -1546,6 +1566,12 @@
self.server.auth_realm)))
self.assertEquals(expected_prompt, actual_prompt)
+ def _expected_username_prompt(self, scheme):
+ return (self._username_prompt_prefix
+ + "%s %s:%d, Realm: '%s' username: " % (scheme.upper(),
+ self.server.host, self.server.port,
+ self.server.auth_realm))
+
def test_no_prompt_for_password_when_using_auth_config(self):
if self._testing_pycurl():
raise tests.TestNotApplicable(
@@ -1617,7 +1643,8 @@
"""Test proxy authentication schemes."""
_auth_header = 'Proxy-authorization'
- _password_prompt_prefix='Proxy '
+ _password_prompt_prefix = 'Proxy '
+ _username_prompt_prefix = 'Proxy '
def setUp(self):
super(TestProxyAuth, self).setUp()
=== modified file 'bzrlib/tests/test_remote.py'
--- a/bzrlib/tests/test_remote.py 2009-04-08 03:34:31 +0000
+++ b/bzrlib/tests/test_remote.py 2009-04-10 19:37:20 +0000
@@ -25,6 +25,7 @@
import bz2
from cStringIO import StringIO
+import getpass
from bzrlib import (
bzrdir,
@@ -1472,9 +1473,9 @@
class TestRemoteSSHTransportAuthentication(tests.TestCaseInTempDir):
- def test_defaults_to_none(self):
+ def test_defaults_to_getuser(self):
t = RemoteSSHTransport('bzr+ssh://example.com')
- self.assertIs(None, t._get_credentials()[0])
+ self.assertIs(getpass.getuser(), t._get_credentials()[0])
def test_uses_authentication_config(self):
conf = config.AuthenticationConfig()
=== modified file 'bzrlib/tests/test_sftp_transport.py'
--- a/bzrlib/tests/test_sftp_transport.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_sftp_transport.py 2009-04-09 20:22:04 +0000
@@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+import getpass
import os
import socket
import sys
@@ -33,6 +34,7 @@
errors,
tests,
transport as _mod_transport,
+ ui,
)
from bzrlib.osutils import (
pathjoin,
@@ -545,4 +547,13 @@
def test_sftp_is_none_if_no_config(self):
t = self.get_transport_for_connection(set_config=False)
- self.assertIs(None, t._get_credentials()[0])
+ self.assertIs(getpass.getuser(), t._get_credentials()[0])
+
+ def test_sftp_doesnt_prompt_username(self):
+ stdout = tests.StringIOWrapper()
+ ui.ui_factory = tests.TestUIFactory(stdin='joe\nfoo\n', stdout=stdout)
+ t = self.get_transport_for_connection(set_config=False)
+ self.assertIs(getpass.getuser(), t._get_credentials()[0])
+ # No prompts should've been printed, stdin shouldn't have been read
+ self.assertEquals("", stdout.getvalue())
+ self.assertEquals(0, ui.ui_factory.stdin.tell())
=== modified file 'bzrlib/transport/ftp/__init__.py'
--- a/bzrlib/transport/ftp/__init__.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/ftp/__init__.py 2009-04-02 15:26:49 +0000
@@ -130,9 +130,6 @@
auth = config.AuthenticationConfig()
if user is None:
user = auth.get_user('ftp', self._host, port=self._port)
- if user is None:
- # Default to local user
- user = getpass.getuser()
mutter("Constructing FTP instance against %r" %
((self._host, self._port, user, '********',
=== modified file 'bzrlib/transport/http/_urllib2_wrappers.py'
--- a/bzrlib/transport/http/_urllib2_wrappers.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/http/_urllib2_wrappers.py 2009-04-09 20:04:47 +0000
@@ -1127,7 +1127,8 @@
if user is None:
user = auth_conf.get_user(auth['protocol'], auth['host'],
port=auth['port'], path=auth['path'],
- realm=realm)
+ realm=realm, ask=True,
+ prompt=self.build_username_prompt(auth))
if user is not None and password is None:
password = auth_conf.get_password(
auth['protocol'], auth['host'], user, port=auth['port'],
@@ -1154,6 +1155,24 @@
prompt += ' password'
return prompt
+ def _build_username_prompt(self, auth):
+ """Build a prompt taking the protocol used into account.
+
+ The AuthHandler is used by http and https, we want that information in
+ the prompt, so we build the prompt from the authentication dict which
+ contains all the needed parts.
+
+ Also, http and proxy AuthHandlers present different prompts to the
+ user. The daughter classes should implements a public
+ build_username_prompt using this method.
+ """
+ prompt = '%s' % auth['protocol'].upper() + ' %(host)s'
+ realm = auth['realm']
+ if realm is not None:
+ prompt += ", Realm: '%s'" % realm
+ prompt += ' username'
+ return prompt
+
def http_request(self, request):
"""Insert an authentication header if information is available"""
auth = self.get_auth(request)
@@ -1385,6 +1404,9 @@
def build_password_prompt(self, auth):
return self._build_password_prompt(auth)
+ def build_username_prompt(self, auth):
+ return self._build_username_prompt(auth)
+
def http_error_401(self, req, fp, code, msg, headers):
return self.auth_required(req, headers)
@@ -1416,6 +1438,11 @@
prompt = 'Proxy ' + prompt
return prompt
+ def build_username_prompt(self, auth):
+ prompt = self._build_username_prompt(auth)
+ prompt = 'Proxy ' + prompt
+ return prompt
+
def http_error_407(self, req, fp, code, msg, headers):
return self.auth_required(req, headers)
=== modified file 'bzrlib/transport/ssh.py'
--- a/bzrlib/transport/ssh.py 2009-03-23 14:59:43 +0000
+++ b/bzrlib/transport/ssh.py 2009-04-02 15:26:49 +0000
@@ -18,7 +18,6 @@
"""Foundation SSH support for SFTP and smart server."""
import errno
-import getpass
import os
import socket
import subprocess
@@ -458,10 +457,11 @@
def _paramiko_auth(username, password, host, port, paramiko_transport):
+ auth = config.AuthenticationConfig()
# paramiko requires a username, but it might be none if nothing was
# supplied. If so, use the local username.
if username is None:
- username = getpass.getuser()
+ username = auth.get_user('ssh', host, port=port)
if _use_ssh_agent:
agent = paramiko.Agent()
@@ -488,7 +488,6 @@
pass
# give up and ask for a password
- auth = config.AuthenticationConfig()
password = auth.get_password('ssh', host, username, port=port)
try:
paramiko_transport.auth_password(username, password)
=== modified file 'bzrlib/ui/text.py'
--- a/bzrlib/ui/text.py 2009-04-07 13:44:51 +0000
+++ b/bzrlib/ui/text.py 2009-04-10 19:37:20 +0000
@@ -25,8 +25,6 @@
from bzrlib.lazy_import import lazy_import
lazy_import(globals(), """
-import getpass
-
from bzrlib import (
progress,
osutils,
More information about the bazaar-commits
mailing list