/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 tools/check-newsbugs.py

  • Committer: Vincent Ladeuil
  • Date: 2009-04-27 16:10:10 UTC
  • mto: (4310.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4311.
  • Revision ID: v.ladeuil+lp@free.fr-20090427161010-7swfzeagf63cpixd
Fix bug #367726 by reverting some default user handling introduced
while fixing bug #256612.

* bzrlib/transport/ssh.py:
(_paramiko_auth): Explicitly use getpass.getuser() as default
user.

* bzrlib/transport/ftp/_gssapi.py:
(GSSAPIFtpTransport._create_connection): Explicitly use
getpass.getuser() as default user.

* bzrlib/transport/ftp/__init__.py:
(FtpTransport._create_connection): Explicitly use
getpass.getuser() as default user.

* bzrlib/tests/test_sftp_transport.py:
(TestUsesAuthConfig.test_sftp_is_none_if_no_config)
(TestUsesAuthConfig.test_sftp_doesnt_prompt_username): Revert to
None as the default user.

* bzrlib/tests/test_remote.py:
(TestRemoteSSHTransportAuthentication): The really offending one:
revert to None as the default user.

* bzrlib/tests/test_config.py:
(TestAuthenticationConfig.test_username_default_no_prompt): Update
test (and some PEP8).

* bzrlib/smtp_connection.py:
(SMTPConnection._authenticate): Revert to None as the default
user.

* bzrlib/plugins/launchpad/account.py:
(_get_auth_user): Revert default value handling.

* bzrlib/config.py:
(AuthenticationConfig.get_user): Fix doc-string. Leave default
value handling to callers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
import getopt, re, sys
6
6
try:
7
 
    from launchpadlib.launchpad import Launchpad
 
7
    from launchpadbugs import connector
8
8
except ImportError:
9
 
    print "Please install launchpadlib from lp:launchpadlib"
 
9
    print "Please install launchpadbugs from lp:python-launchpad-bugs"
10
10
    sys.exit(1)
11
11
 
12
12
options, args = getopt.gnu_getopt(sys.argv, "l", ["launchpad"])
22
22
 
23
23
def report_notmarked(bug, task, section):
24
24
    print 
25
 
    print "Bug %d was mentioned in NEWS but is not marked fix released:" % (bug.id, )
 
25
    print "Bug %d was mentioned in NEWS but is not marked fix released:" % (bug.bugnumber, )
26
26
    print "Launchpad title: %s" % bug.title
27
27
    print "NEWS summary: "
28
28
    print section
29
29
    if "--launchpad" in options or "-l" in options:
30
 
        print "  bug %d" % bug.id
31
 
        print "  affects %s" % task.bug_target_name
 
30
        print "  bug %d" % bug.bugnumber
 
31
        print "  affects bzr"
32
32
        print "  status fixreleased"
33
33
 
34
34
 
60
60
    finally:
61
61
        f.close()
62
62
 
63
 
 
64
 
lp = Launchpad.login_anonymously('bzr-check-newsbugs', 'edge', version='1.0')
 
63
open_bug = connector.ConnectBug("TEXT")
65
64
 
66
65
bugnos = read_news_bugnos(args[1])
67
66
for bugno, section in bugnos:
68
 
    bug = lp.bugs[bugno]
 
67
    bug = open_bug(url="https://bugs.launchpad.net/bzr/+bug/%d" % bugno)
69
68
    found_bzr = False
70
 
    for task in bug.bug_tasks:
71
 
        if task.bug_target_name == "bzr":
 
69
    for task in bug.infotable:
 
70
        if task.affects == "bzr":
72
71
            found_bzr = True
73
72
            if task.status != "Fix Released":
74
73
                report_notmarked(bug, task, section)