|
|
Created:
11 years, 4 months ago by Paweł Hajdan Jr. Modified:
9 years, 7 months ago Reviewers:
Mark Mentovai, darin (slow to review), M-A Ruel CC:
chromium-reviews_googlegroups.com, M-A Ruel Visibility:
Public. |
DescriptionPass matching file list to the hook in gclient.
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=22224
Patch Set 1 #Patch Set 2 : '' #
Total comments: 1
Created: 11 years, 4 months ago
Messages
Total messages: 9 (0 generated)
I got a confusing presubmit error :-/ ** Presubmit Messages ** 4 unit tests failed. *************** Test 'tests.gcl_unittest' failed with code 255 Traceback (most recent call last): File "/usr/lib/python2.5/runpy.py", line 95, in run_module filename, loader, alter_sys) File "/usr/lib/python2.5/runpy.py", line 52, in _run_module_code mod_name, mod_fname, mod_loader) File "/usr/lib/python2.5/runpy.py", line 32, in _run_code exec code in run_globals File "/chromium/depot_tools/tests/gcl_unittest.py", line 11, in <module> import gcl ImportError: No module named gcl Test 'tests.gclient_test' failed with code 255 Traceback (most recent call last): File "/usr/lib/python2.5/runpy.py", line 95, in run_module filename, loader, alter_sys) File "/usr/lib/python2.5/runpy.py", line 52, in _run_module_code mod_name, mod_fname, mod_loader) File "/usr/lib/python2.5/runpy.py", line 32, in _run_code exec code in run_globals File "/chromium/depot_tools/tests/gclient_test.py", line 26, in <module> import gclient ImportError: No module named gclient Test 'tests.presubmit_unittest' failed with code 255 Traceback (most recent call last): File "/usr/lib/python2.5/runpy.py", line 95, in run_module filename, loader, alter_sys) File "/usr/lib/python2.5/runpy.py", line 52, in _run_module_code mod_name, mod_fname, mod_loader) File "/usr/lib/python2.5/runpy.py", line 32, in _run_code exec code in run_globals File "/chromium/depot_tools/tests/presubmit_unittest.py", line 14, in <module> import presubmit_support as presubmit ImportError: No module named presubmit_support Test 'tests.revert_unittest' failed with code 255 Traceback (most recent call last): File "/usr/lib/python2.5/runpy.py", line 95, in run_module filename, loader, alter_sys) File "/usr/lib/python2.5/runpy.py", line 52, in _run_module_code mod_name, mod_fname, mod_loader) File "/usr/lib/python2.5/runpy.py", line 32, in _run_code exec code in run_globals File "/chromium/depot_tools/tests/revert_unittest.py", line 12, in <module> import revert ImportError: No module named revert ***************
lgtm but to run the test, just export PYTHONPATH=. and try again. Sorry about that, feel free to fix. :)
LGTM
Updated the change to not break the tree. gyp would break if passed the file list. Please review.
ping
lgtm but I'd like to see a test for that.
http://codereview.chromium.org/160294/diff/1002/6 File gclient.py (right): http://codereview.chromium.org/160294/diff/1002/6#newcode1236 Line 1236: command.remove('$matching_files') Don't you want to splice matching_file_list into the position where $matching_files was found?
It probably won't make much difference, because I plan to have $matching_files at the end of command line. If there's easy and readable way to splice, I can do that. On Fri, Jul 31, 2009 at 12:12, <mark@chromium.org> wrote: > > http://codereview.chromium.org/160294/diff/1002/6 > File gclient.py (right): > > http://codereview.chromium.org/160294/diff/1002/6#newcode1236 > Line 1236: command.remove('$matching_files') > Don't you want to splice matching_file_list into the position where > $matching_files was found? > > > http://codereview.chromium.org/160294 >
Pawe=C5=82, please use this: if '$matching_files' in command: splice_index =3D command.index('$matching_files') command[splice_index:splice_index + 1] =3D matching_file_list For that matter, you could even replace the very first word ("if") with "while" to handle the odd case where "$matching_files" appears more than once. Mark On Fri, Jul 31, 2009 at 7:45 PM, Pawe=C5=82 Hajdan Jr.<phajdan.jr@chromium.org> wrote: > It probably won't make much difference, because I plan to have > $matching_files at the end of command line. > If there's easy and readable way to splice, I can do that. > > On Fri, Jul 31, 2009 at 12:12, <mark@chromium.org> wrote: >> >> http://codereview.chromium.org/160294/diff/1002/6 >> File gclient.py (right): >> >> http://codereview.chromium.org/160294/diff/1002/6#newcode1236 >> Line 1236: command.remove('$matching_files') >> Don't you want to splice matching_file_list into the position where >> $matching_files was found? >> >> http://codereview.chromium.org/160294 |