Rev 3326: (james_w) Give a warning about readonly lp: transports in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Wed Apr 2 06:09:00 BST 2008


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

------------------------------------------------------------
revno: 3326
revision-id:pqm at pqm.ubuntu.com-20080402050849-c07i1cjma61941ie
parent: pqm at pqm.ubuntu.com-20080402033550-znvaid7pkrjmf3gg
parent: mbp at sourcefrog.net-20080402031119-zbts7kcx608zb4dj
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Wed 2008-04-02 06:08:49 +0100
message:
  (james_w) Give a warning about readonly lp: transports
modified:
  NEWS                           NEWS-20050323055033-4e00b5db738777ff
  bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
    ------------------------------------------------------------
    revno: 3324.2.1
    revision-id:mbp at sourcefrog.net-20080402031119-zbts7kcx608zb4dj
    parent: pqm at pqm.ubuntu.com-20080401091848-6y4f104r061ad8bk
    parent: jw+debian at jameswestby.net-20080318091146-1yyzkxafkto6whoa
    committer: Martin Pool <mbp at sourcefrog.net>
    branch nick: trivial
    timestamp: Wed 2008-04-02 14:11:19 +1100
    message:
      (james_w) Give a warning about readonly lp: transports
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
    ------------------------------------------------------------
    revno: 3270.4.2
    revision-id:jw+debian at jameswestby.net-20080318091146-1yyzkxafkto6whoa
    parent: jw+debian at jameswestby.net-20080316113653-51kcmxqg4x55ecc3
    committer: James Westby <jw+debian at jameswestby.net>
    branch nick: temp
    timestamp: Tue 2008-03-18 09:11:46 +0000
    message:
      Add a comma as suggested by Martin.
    modified:
      bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
    ------------------------------------------------------------
    revno: 3270.4.1
    revision-id:jw+debian at jameswestby.net-20080316113653-51kcmxqg4x55ecc3
    parent: pqm at pqm.ubuntu.com-20080313004030-mff9aq1jfg13n0qi
    committer: James Westby <jw+debian at jameswestby.net>
    branch nick: bzr.dev
    timestamp: Sun 2008-03-16 11:36:53 +0000
    message:
      Warn the user when resolving lp: URLs if they haven't set their login.
    modified:
      NEWS                           NEWS-20050323055033-4e00b5db738777ff
      bzrlib/plugins/launchpad/lp_directory.py lp_indirect.py-20070126012204-de5rugwlt22c7u7e-1
=== modified file 'NEWS'
--- a/NEWS	2008-04-02 01:46:35 +0000
+++ b/NEWS	2008-04-02 05:08:49 +0000
@@ -42,6 +42,10 @@
     * Merge is faster.  We no longer check a file's existence unnecessarily
       when merging the execute bit.  (Aaron Bentley)
 
+    * The launchpad directory service now warns the user if they have not set
+      their launchpad login and are trying to resolve a URL using it, just
+      in case they want to do a write operation with it.  (James Westby)
+
     * The smart protocol client is slightly faster, because it now only queries
       the server for the protocol version once per connection.  Also, the HTTP
       transport will now automatically use a smart server if one is present.

=== modified file 'bzrlib/plugins/launchpad/lp_directory.py'
--- a/bzrlib/plugins/launchpad/lp_directory.py	2008-03-07 12:54:09 +0000
+++ b/bzrlib/plugins/launchpad/lp_directory.py	2008-04-02 03:11:19 +0000
@@ -83,6 +83,7 @@
 
         if _lp_login is None:
             _lp_login = get_lp_login()
+        _warned_login = False
         for url in result['urls']:
             scheme, netloc, path, query, fragment = urlsplit(url)
             if self._requires_launchpad_login(scheme, netloc, path, query,
@@ -90,6 +91,13 @@
                 # Only accept launchpad.net bzr+ssh URLs if we know
                 # the user's Launchpad login:
                 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 '
+                                'write operation it may fail. If it does, '
+                                'run "bzr launchpad-login YOUR_ID" to '
+                                'set your login and try again.')
+                        _warned_login = True
                     continue
                 url = urlunsplit((scheme, '%s@%s' % (_lp_login, netloc),
                                   path, query, fragment))




More information about the bazaar-commits mailing list