|
|
Chromium Code Reviews|
Created:
4 years, 8 months ago by sdefresne Modified:
4 years, 8 months ago CC:
chromium-reviews, dpranke+depot_tools_chromium.org, iannucci+depot_tools_chromium.org Base URL:
https://chromium.googlesource.com/chromium/tools/depot_tools.git@master Target Ref:
refs/heads/master Project:
depot_tools Visibility:
Public. |
DescriptionConvert cpplint.py to work with nested git repositories.
Chrome on iOS downstream repository tracks Chromium via DEPS and wants
to use cpplint canned presubmit check but the cpplint.py errors due at
the include guard as it stops at the inner most git repository.
Change cpplint.py to look for the outermost git repository when looking
for the repository root.
BUG=598090
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300085
Patch Set 1 #
Messages
Total messages: 17 (6 generated)
sdefresne@chromium.org changed reviewers: + iannucci@chromium.org
Please take a look.
iannucci@chromium.org changed reviewers: + skym@chromium.org
+someone who's actually ever looked at this file
but other than that lgtm
lgtm
The CQ bit was checked by sdefresne@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1897153003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1897153003/1
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by sdefresne@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1897153003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1897153003/1
Message was sent while issue was closed.
Description was changed from ========== Convert cpplint.py to work with nested git repositories. Chrome on iOS downstream repository tracks Chromium via DEPS and wants to use cpplint canned presubmit check but the cpplint.py errors due at the include guard as it stops at the inner most git repository. Change cpplint.py to look for the outermost git repository when looking for the repository root. BUG=598090 ========== to ========== Convert cpplint.py to work with nested git repositories. Chrome on iOS downstream repository tracks Chromium via DEPS and wants to use cpplint canned presubmit check but the cpplint.py errors due at the include guard as it stops at the inner most git repository. Change cpplint.py to look for the outermost git repository when looking for the repository root. BUG=598090 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300085 ==========
Message was sent while issue was closed.
Committed patchset #1 (id:1) as http://src.chromium.org/viewvc/chrome?view=rev&revision=300085
Message was sent while issue was closed.
Commenting here since I don't have access to the bug.
This broke our (Crosswalk) downstream repositories: we run
presubmit_canned_checks.CheckChangeLintsClean() on patch submission, and our
checkout is done inside a Buildbot repository, so now RepositoryName() returns a
path starting at the Buildbot repository root directory. This has since been
worked around in our PRESUBMIT.py code, but I can see it potentially breaking
things for other users too.
FWIW, we had the same problem described in the CL description, and at the time I
worked around it by doing something like this:
def MyCheckChangeLintsClean(input_api, output_api):
class PrefixedFileInfo(cpplint.FileInfo):
return 'chrome/' + super(PrefixedFileInfo, self).RepositoryName()
input_api.cpplint.FileInfo = PrefixedFileInfo
source_filter = ...
return input_api.canned_checks.CheckChangeLintsClean(
input_api, output_api, source_filter)
Message was sent while issue was closed.
On 2016/04/22 09:46:14, Raphael Kubo da Costa (rakuco) wrote: > return 'chrome/' + super(PrefixedFileInfo, self).RepositoryName() 'chrome/' was only an example there, of course.
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/1919483002/ by kjellander@chromium.org. The reason for reverting is: This breaks WebRTC presubmit on the buildbots (due to /b/build being a Git repo, which in turn contains the checkout). See https://bugs.chromium.org/p/webrtc/issues/detail?id=5818 for more details. It seems it also broke other projects (rakuco's comment #15). . |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
