Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(407)

Issue 7066030: grit_info: Explicitly make __file__ relative to the current directory. (Closed)

Created:
9 years, 7 months ago by Nico
Modified:
9 years, 7 months ago
Reviewers:
Mark Mentovai, tony
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

grit_info: Explicitly make __file__ relative to the current directory. __file__ is relative if grit_info is called like `python ../tools/grit/grit_info.py`, but not if it's invoked from python code like `import grit_info; grit_info.DoMain()`. And that confuses the xcode project generator, which will complain about hash collisions if these paths are serialized in absolute form. BUG=82230 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86551 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=86647

Patch Set 1 #

Total comments: 2

Patch Set 2 : relpath :-/ #

Total comments: 2

Patch Set 3 : license #

Unified diffs Side-by-side diffs Delta from patch set Stats (+84 lines, -1 line) Patch
M tools/grit/grit_info.py View 1 2 2 chunks +84 lines, -1 line 0 comments Download

Messages

Total messages: 9 (0 generated)
Nico
"I understand now why it's broken, but I don't understand how it ever worked before."
9 years, 7 months ago (2011-05-24 19:35:40 UTC) #1
Mark Mentovai
I defer to Tony.
9 years, 7 months ago (2011-05-24 20:12:46 UTC) #2
tony
http://codereview.chromium.org/7066030/diff/1/tools/grit/grit_info.py File tools/grit/grit_info.py (right): http://codereview.chromium.org/7066030/diff/1/tools/grit/grit_info.py#newcode69 tools/grit/grit_info.py:69: grit_root_dir = os.path.relpath(os.path.dirname(__file__), os.getcwd()) os.path.relpath was added in python ...
9 years, 7 months ago (2011-05-24 20:28:05 UTC) #3
Nico
http://codereview.chromium.org/7066030/diff/1/tools/grit/grit_info.py File tools/grit/grit_info.py (right): http://codereview.chromium.org/7066030/diff/1/tools/grit/grit_info.py#newcode69 tools/grit/grit_info.py:69: grit_root_dir = os.path.relpath(os.path.dirname(__file__), os.getcwd()) On 2011/05/24 20:28:06, tony wrote: ...
9 years, 7 months ago (2011-05-24 21:37:20 UTC) #4
tony
Ok, then LGTM!
9 years, 7 months ago (2011-05-24 23:20:50 UTC) #5
Nico
Turns out the tester bots run grit_info too, so I had to revert this. I ...
9 years, 7 months ago (2011-05-25 03:04:48 UTC) #6
tony
http://codereview.chromium.org/7066030/diff/4001/tools/grit/grit_info.py File tools/grit/grit_info.py (right): http://codereview.chromium.org/7066030/diff/4001/tools/grit/grit_info.py#newcode19 tools/grit/grit_info.py:19: # the relpath implementation from the python source. If ...
9 years, 7 months ago (2011-05-25 03:54:14 UTC) #7
Nico
http://codereview.chromium.org/7066030/diff/4001/tools/grit/grit_info.py File tools/grit/grit_info.py (right): http://codereview.chromium.org/7066030/diff/4001/tools/grit/grit_info.py#newcode19 tools/grit/grit_info.py:19: # the relpath implementation from the python source. On ...
9 years, 7 months ago (2011-05-25 04:48:30 UTC) #8
tony
9 years, 7 months ago (2011-05-25 17:06:53 UTC) #9
LGTM

Powered by Google App Engine
This is Rietveld 408576698