RESOLVED FIXED 36891
webkitpy: Refactor two os.path.relpath() replacements to use the same method
https://bugs.webkit.org/show_bug.cgi?id=36891
Summary webkitpy: Refactor two os.path.relpath() replacements to use the same method
Chris Jerdonek
Reported 2010-03-31 10:18:59 PDT
We reimplemented os.path.relpath() twice. We should share code there.
Attachments
Proposed patch (14.00 KB, patch)
2010-03-31 10:33 PDT, Chris Jerdonek
eric: review+
cjerdonek: commit-queue-
Chris Jerdonek
Comment 1 2010-03-31 10:33:18 PDT
Created attachment 52185 [details] Proposed patch
Chris Jerdonek
Comment 2 2010-03-31 10:42:49 PDT
FYI, I added a section to this page about consequences of not using Python 2.6: http://trac.webkit.org/wiki/PythonGuidelines
Eric Seidel (no email)
Comment 3 2010-03-31 11:04:55 PDT
Comment on attachment 52185 [details] Proposed patch YAY! But what the heck is "opsys". Seems like a strange module name.
Eric Seidel (no email)
Comment 4 2010-03-31 11:05:45 PDT
Seems like we should update that page to say that our scripts require 2.5, period.
Chris Jerdonek
Comment 5 2010-03-31 11:09:26 PDT
(In reply to comment #3) > (From update of attachment 52185 [details]) > YAY! But what the heck is "opsys". Seems like a strange module name. Operating system. My preference was "os", but that presented problems for other modules in the package calling "import os". I'm open to other suggestions.
Chris Jerdonek
Comment 6 2010-03-31 11:10:49 PDT
(In reply to comment #4) > Seems like we should update that page to say that our scripts require 2.5, > period. Thanks -- yeah, I just noticed that, too. I'll change it.
Eric Seidel (no email)
Comment 7 2010-03-31 11:13:44 PDT
Why not just call the module relpath?
Chris Jerdonek
Comment 8 2010-03-31 11:21:47 PDT
(In reply to comment #7) > Why not just call the module relpath? I thought about that, but then figured there was going to be at least one more os-related method at some point. I suppose we can always rename the file. I'll change it to relpath.
Chris Jerdonek
Comment 9 2010-03-31 11:22:09 PDT
Comment on attachment 52185 [details] Proposed patch cq- so I can rename the file to relpath.
Eric Seidel (no email)
Comment 10 2010-03-31 11:29:22 PDT
Maybe a name to designate that we're expanding on missing pieces of OS, like osadditions or something like that if that would be more clear than osys/relpath? In the end it doesn't matter. Feel free to name it as you choose. :)
Chris Jerdonek
Comment 11 2010-03-31 14:46:12 PDT
Committed: http://trac.webkit.org/changeset/56870 I split the difference between os and relpath and chose ospath.
Note You need to log in before you can comment on or make changes to this bug.