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

Issue 2160383002: Make `gn refs` handle files in data directories properly. (Closed)

Created:
4 years, 5 months ago by Dirk Pranke
Modified:
4 years, 5 months ago
Reviewers:
brettw
CC:
chromium-reviews, tfarina
Base URL:
https://chromium.googlesource.com/chromium/src.git@gn_refs_scripts
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make `gn refs` handle files in data directories properly. If a target specified `data = [ "test/" ]` and you ran `gn refs out/Default //foo //foo/test/bar.cc`, gn refs would incorrectly think that nothing referenced bar.cc. This patch fixes that. R=brettw@chromium.org BUG=628783 Committed: https://crrev.com/267b1de99ba7baf7150d4e8e1b9e42969c16c343 Cr-Commit-Position: refs/heads/master@{#406689}

Patch Set 1 #

Total comments: 2

Patch Set 2 : use base::StartsWith #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M tools/gn/command_refs.cc View 1 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
Dirk Pranke
4 years, 5 months ago (2016-07-19 20:24:01 UTC) #1
jam
I'm not familiar with this code, but the patch doesn't look like it'll handle //foo/test/bar/baz.cc?
4 years, 5 months ago (2016-07-19 20:53:37 UTC) #2
Dirk Pranke
On 2016/07/19 20:53:37, jam wrote: > I'm not familiar with this code, but the patch ...
4 years, 5 months ago (2016-07-19 21:45:54 UTC) #3
jam
On 2016/07/19 21:45:54, Dirk Pranke wrote: > On 2016/07/19 20:53:37, jam wrote: > > I'm ...
4 years, 5 months ago (2016-07-20 17:03:28 UTC) #4
brettw
lgtm https://codereview.chromium.org/2160383002/diff/1/tools/gn/command_refs.cc File tools/gn/command_refs.cc (right): https://codereview.chromium.org/2160383002/diff/1/tools/gn/command_refs.cc#newcode147 tools/gn/command_refs.cc:147: !strncmp(cur_file.c_str(), file.value().c_str(), cur_file.size() - 1)) How about cur_file.back() ...
4 years, 5 months ago (2016-07-20 17:52:14 UTC) #5
Dirk Pranke
https://codereview.chromium.org/2160383002/diff/1/tools/gn/command_refs.cc File tools/gn/command_refs.cc (right): https://codereview.chromium.org/2160383002/diff/1/tools/gn/command_refs.cc#newcode147 tools/gn/command_refs.cc:147: !strncmp(cur_file.c_str(), file.value().c_str(), cur_file.size() - 1)) On 2016/07/20 17:52:14, brettw ...
4 years, 5 months ago (2016-07-20 21:24:31 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2160383002/20001
4 years, 5 months ago (2016-07-20 21:41:11 UTC) #9
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-20 22:22:20 UTC) #10
commit-bot: I haz the power
4 years, 5 months ago (2016-07-20 22:24:04 UTC) #12
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/267b1de99ba7baf7150d4e8e1b9e42969c16c343
Cr-Commit-Position: refs/heads/master@{#406689}

Powered by Google App Engine
This is Rietveld 408576698