Rev 3837: (mbp) Better message when the user needs to set their Launchpad ID. in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Fri Nov 14 02:58:50 GMT 2008


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 3837
revision-id: pqm at pqm.ubuntu.com-20081114025846-mke6wrhcr7scvx1z
parent: pqm at pqm.ubuntu.com-20081113144206-sc0ufw1l26942lyv
parent: mbp at sourcefrog.net-20081114021307-ti77y451qb1gtbi3
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Fri 2008-11-14 02:58:46 +0000
message:
  (mbp) Better message when the user needs to set their Launchpad ID.
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
  bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
  bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
    ------------------------------------------------------------
    revno: 3834.1.4
    revision-id: mbp at sourcefrog.net-20081114021307-ti77y451qb1gtbi3
    parent: mbp at sourcefrog.net-20081114014356-p9dqitads84gk1yz
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: 289148-sshkey-message
    timestamp: Fri 2008-11-14 12:13:07 +1000
    message:
      Update NEWS
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
    ------------------------------------------------------------
    revno: 3834.1.3
    revision-id: mbp at sourcefrog.net-20081114014356-p9dqitads84gk1yz
    parent: mbp at sourcefrog.net-20081114003537-a26v2m6ispgxvizw
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: 289148-sshkey-message
    timestamp: Fri 2008-11-14 11:43:56 +1000
    message:
      Shorter message about launchpad-login
    modified:
      bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
    ------------------------------------------------------------
    revno: 3834.1.2
    revision-id: mbp at sourcefrog.net-20081114003537-a26v2m6ispgxvizw
    parent: mbp at sourcefrog.net-20081114000837-0mweacj6x77q0sxa
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: 289148-sshkey-message
    timestamp: Fri 2008-11-14 10:35:37 +1000
    message:
      Better message when launchpad-login is needed
    modified:
      bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
    ------------------------------------------------------------
    revno: 3834.1.1
    revision-id: mbp at sourcefrog.net-20081114000837-0mweacj6x77q0sxa
    parent: pqm at pqm.ubuntu.com-20081112073322-dpai0jsluo3cvpf2
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: 289148-sshkey-message
    timestamp: Fri 2008-11-14 10:08:37 +1000
    message:
      Better message when you have no Launchpad SSH keys (#289148)
    modified:
      bzrlib/plugins/launchpad/account.py account.py-20071011033320-50y6vfftywf4yllw-1
      bzrlib/plugins/launchpad/test_account.py test_account.py-20071011033320-50y6vfftywf4yllw-2
=== modified file 'NEWS'
--- a/NEWS	2008-11-12 05:23:19 +0000
+++ b/NEWS	2008-11-14 02:13:07 +0000
@@ -27,6 +27,9 @@
 
   BUG FIXES:
 
+    * Better message when the user needs to set their Launchpad ID.
+      (Martin Pool, #289148)
+
     * TooManyConcurrentRequests no longer occur when a fetch fails and
       tries to abort a write group.  This allows the root cause (e.g. a
       network interruption) to be reported.  (Andrew Bennetts, #297014)

=== modified file 'bzrlib/plugins/launchpad/account.py'
--- a/bzrlib/plugins/launchpad/account.py	2008-10-23 17:43:37 +0000
+++ b/bzrlib/plugins/launchpad/account.py	2008-11-14 00:08:37 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Canonical Ltd
+# Copyright (C) 2007, 2008 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -33,7 +33,8 @@
 
 
 class NoRegisteredSSHKeys(errors.BzrError):
-    _fmt = "The user %(user)s has not registered any SSH keys with Launchpad."
+    _fmt = "The user %(user)s has not registered any SSH keys with Launchpad.\n" \
+        "See <https://launchpad.net/people/+me>"
 
 
 class MismatchedUsernames(errors.BzrError):

=== modified file 'bzrlib/plugins/launchpad/lp_directory.py'
--- a/bzrlib/plugins/launchpad/lp_directory.py	2008-10-17 14:21:20 +0000
+++ b/bzrlib/plugins/launchpad/lp_directory.py	2008-11-14 01:43:56 +0000
@@ -94,10 +94,9 @@
                     break
                 if _lp_login is None:
                     if not _warned_login:
-                        trace.warning('You have not informed bzr of your '
-                                'launchpad login. If you are attempting a\n'
-                                'write operation and it fails, run '
-                                '"bzr launchpad-login YOUR_ID" and try again.')
+                        trace.warning(
+'You have not informed bzr of your Launchpad ID, and you must do this to\n'
+'write to Launchpad or access private data.  See "bzr help launchpad-login".')
                         _warned_login = True
             else:
                 # Use the URL if we can create a transport for it.

=== modified file 'bzrlib/plugins/launchpad/test_account.py'
--- a/bzrlib/plugins/launchpad/test_account.py	2008-10-23 17:43:37 +0000
+++ b/bzrlib/plugins/launchpad/test_account.py	2008-11-14 00:08:37 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Canonical Ltd
+# Copyright (C) 2007, 2008 Canonical Ltd
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -61,7 +61,9 @@
         # Test formatting of NoRegisteredSSHKeys exception
         error = account.NoRegisteredSSHKeys(user='test-user')
         self.assertEqualDiff('The user test-user has not registered any '
-                             'SSH keys with Launchpad.', str(error))
+            'SSH keys with Launchpad.\n'
+            'See <https://launchpad.net/people/+me>',
+            str(error))
 
     def test_set_lp_login_updates_authentication_conf(self):
         self.assertIs(None, account._get_auth_user())




More information about the bazaar-commits mailing list