Bug 27117 - bugzilla-tool: use Mac OS X keychain for authentication
Summary: bugzilla-tool: use Mac OS X keychain for authentication
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-09 07:35 PDT by David Kilzer (:ddkilzer)
Modified: 2009-07-10 14:11 PDT (History)
3 users (show)

See Also:


Attachments
Patch v1 (7.57 KB, patch)
2009-07-09 07:35 PDT, David Kilzer (:ddkilzer)
eric: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Kilzer (:ddkilzer) 2009-07-09 07:35:55 PDT
Created attachment 32517 [details]
Patch v1

Reviewed by NOBODY (OOPS!).

Try reading credentials from git config first, then keychain if
running on Mac OS X, else prompt at the command-line.

* Scripts/modules/bugzilla.py: Added "import platform".
(credentials_from_git): Added.
(credentials_from_keychain): Added.
(is_mac_os_x): Added.
(read_credentials): Added.
(Bugzilla.__init__): Moved instance attribute bug_server to a
static attribute named bug-server_url.
(Bugzilla.bug_server_host): Added.  Extracted host name from
bug_server_url.
(Bugzilla.bug_server_regex): Updated to be created using
bug_server_host.
(Bugzilla.bug_server_url): Renamed from bug_server.
(Bugzilla.bug_url_for_bug_id): Updated for renaming of
bug_server to bug_server_url.
(Bugzilla.attachment_url_for_id): Ditto.
(Bugzilla.fetch_bug_ids_from_commit_queue): Ditto.
(Bugzilla.authenticate): Ditto.  Updated to use
read_credentials().
(Bugzilla.add_patch_to_bug): Ditto.
---
 2 files changed, 88 insertions(+), 19 deletions(-)
Comment 1 Eric Seidel (no email) 2009-07-09 14:46:36 PDT
Comment on attachment 32517 [details]
Patch v1

Looks good!
Comment 2 Eric Seidel (no email) 2009-07-09 14:47:31 PDT
I think you'll find dave.levin useful for python reviews.  Also Mark has yelled at me in the past for CCing him on bugs for review, so you might want to ask if you haven't.
Comment 3 David Kilzer (:ddkilzer) 2009-07-10 14:11:08 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/modules/bugzilla.py
Committed r45726
	M	WebKitTools/ChangeLog
	M	WebKitTools/Scripts/modules/bugzilla.py
r45726 = 857c6cef8ff324fd259d62208e5af28d43bd2fd3 (trunk)
No changes between current HEAD and refs/remotes/trunk
Resetting to the latest refs/remotes/trunk
http://trac.webkit.org/changeset/45726