RESOLVED FIXED 36865
path to committers.py in commit-queue rejection message is wrong
https://bugs.webkit.org/show_bug.cgi?id=36865
Summary path to committers.py in commit-queue rejection message is wrong
Eric Seidel (no email)
Reported 2010-03-30 17:27:44 PDT
path to committers.py in commit-queue rejection message is wrong Right now it's hardcoded in CommitterValidator (inside bugzilla.py) committer_list = "WebKitTools/Scripts/webkitpy/committers.py" I havne't yet found the magic for computing the __file__ dynamically. You can get the __file__ from a module object, but we import just the class and not the module. You can get the module name (string) from classname.__module__ or instance.__class__.__module__ But I don't yet know how to get to the actual module object. If we moved towards a model where we used: import committers statements instead of: from committers import CommitterList then we could easily just grab "committers.__file__" and be done. :)
Attachments
Patch (6.81 KB, patch)
2010-03-31 01:18 PDT, Eric Seidel (no email)
no flags
Chris Jerdonek
Comment 1 2010-03-30 17:39:24 PDT
(In reply to comment #0) > If we moved towards a model where we used: > import committers > > statements instead of: > > from committers import CommitterList > > then we could easily just grab "committers.__file__" and be done. :) Why wouldn't you want to do "import committers" if you need it? Also, have you tried from committers import __file__? (Not sure if that would work.)
Chris Jerdonek
Comment 2 2010-03-30 17:40:17 PDT
(In reply to comment #1) > from committers import __file__? > > (Not sure if that would work.) Or better is probably-- from committers import __file__ as _committers_file
Chris Jerdonek
Comment 3 2010-03-30 23:34:23 PDT
(In reply to comment #2) > Or better is probably-- > > from committers import __file__ as _committers_file Yes, this works. But since it can return the .pyc file if it exists, you probably want to normalize the extension to .py.
Eric Seidel (no email)
Comment 4 2010-03-31 01:18:40 PDT
Eric Seidel (no email)
Comment 5 2010-03-31 01:19:04 PDT
Comment on attachment 52140 [details] Patch I am completely covered in Yak hair.
Adam Barth
Comment 6 2010-03-31 01:40:00 PDT
Comment on attachment 52140 [details] Patch This code is really wrong, but ok. /WebKitTools/svn/WebKitTools/Scripts/webkitpy
WebKit Commit Bot
Comment 7 2010-03-31 03:46:05 PDT
Comment on attachment 52140 [details] Patch Clearing flags on attachment: 52140 Committed r56835: <http://trac.webkit.org/changeset/56835>
WebKit Commit Bot
Comment 8 2010-03-31 03:46:11 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.