/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/plugins/launchpad/__init__.py

  • Committer: Martin Pool
  • Date: 2009-07-07 23:46:54 UTC
  • mfrom: (4513.1.1 lock-unicode)
  • mto: This revision was merged to the branch mainline in revision 4515.
  • Revision ID: mbp@sourcefrog.net-20090707234654-np06h03b0fbsyiz6
merge fix for OS locks on unicode paths on win32

Show diffs side-by-side

added added

removed removed

Lines of Context:
220
220
    aliases = ['lp-login']
221
221
    takes_args = ['name?']
222
222
    takes_options = [
 
223
        'verbose',
223
224
        Option('no-check',
224
225
               "Don't check that the user name is valid."),
225
226
        ]
226
227
 
227
 
    def run(self, name=None, no_check=False):
 
228
    def run(self, name=None, no_check=False, verbose=False):
228
229
        from bzrlib.plugins.launchpad import account
229
230
        check_account = not no_check
230
231
 
233
234
            if username:
234
235
                if check_account:
235
236
                    account.check_lp_login(username)
 
237
                    if verbose:
 
238
                        self.outf.write(
 
239
                            "Launchpad user ID exists and has SSH keys.\n")
236
240
                self.outf.write(username + '\n')
237
241
            else:
238
242
                self.outf.write('No Launchpad user ID configured.\n')
241
245
            name = name.lower()
242
246
            if check_account:
243
247
                account.check_lp_login(name)
 
248
                if verbose:
 
249
                    self.outf.write(
 
250
                        "Launchpad user ID exists and has SSH keys.\n")
244
251
            account.set_lp_login(name)
 
252
            if verbose:
 
253
                self.outf.write("Launchpad user ID set to '%s'.\n" % (name,))
245
254
 
246
255
register_command(cmd_launchpad_login)
247
256
 
259
268
    from bzrlib.plugins.launchpad import (
260
269
        test_account,
261
270
        test_lp_directory,
 
271
        test_lp_login,
262
272
        test_lp_open,
263
273
        test_lp_service,
264
274
        test_register,
270
280
        test_account,
271
281
        test_register,
272
282
        test_lp_directory,
 
283
        test_lp_login,
273
284
        test_lp_open,
274
285
        test_lp_service,
275
286
        ]: