~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
 
84
84
        if _lp_login is None:
85
85
            _lp_login = get_lp_login()
 
86
        _warned_login = False
86
87
        for url in result['urls']:
87
88
            scheme, netloc, path, query, fragment = urlsplit(url)
88
89
            if self._requires_launchpad_login(scheme, netloc, path, query,
90
91
                # Only accept launchpad.net bzr+ssh URLs if we know
91
92
                # the user's Launchpad login:
92
93
                if _lp_login is None:
 
94
                    if not _warned_login:
 
95
                        trace.warning('You have not informed bzr of your '
 
96
                                'launchpad login. If you are attempting a '
 
97
                                'write operation it may fail. If it does, '
 
98
                                'run "bzr launchpad-login YOUR_ID" to '
 
99
                                'set your login and try again.')
 
100
                        _warned_login = True
93
101
                    continue
94
102
                url = urlunsplit((scheme, '%s@%s' % (_lp_login, netloc),
95
103
                                  path, query, fragment))