Commit Graph

1271 Commits (235b70db85e63d3ef32941991845997c58b940b8)

Author SHA1 Message Date
Paweł Hajdan, Jr 0870df2817 gclient flatten: only print DEPS info referenced by recursedeps
Bug: 756474, 570091
Change-Id: I8777b611f2b77b71cf75ec64ec1f0afca2104235
Reviewed-on: https://chromium-review.googlesource.com/629082
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 76a9d04a66 gclient flatten: include info about DEPS files: repos and paths
This CL includes this as comments in flattened DEPS, as requested
on the bug. For automated processes using this, we should export
the data in machine-readable form outside of the DEPS file.

Bug: 756474, 570091
Change-Id: I78cd2105113f41d599e293e772e1f1ca42679f3c
Reviewed-on: https://chromium-review.googlesource.com/621726
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr adae2a62f7 gclient flatten: correctness fixes for OS-specific recursedeps
We need to pass OS info to recursively called _flatten_dep.
Regular deps entries in OS-specific DEPS file recursed into
need to be marked as OS-specific in the flattened file.

Bug: 570091
Change-Id: If3055b84143d8a52d10d8753113893b5054b4d07
Reviewed-on: https://chromium-review.googlesource.com/621046
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr c69b32e1ea gclient flatten: parse DEPS file for deps_os recursedeps
Bug: 570091
Change-Id: I773b74b042233efa2a525f5f47e920468b7fea4a
Reviewed-on: https://chromium-review.googlesource.com/618930
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 5ec7713bed gclient flatten: fixes for --pin-all-deps
Consistently pin all dependencies - including deps_os and ones
with shortened shas.

We add --process-all-deps switch so that users can easily
tell gclient to check out all affected dependencies locally.

Bug: 570091
Change-Id: If68db98000c569ae35dd7d0a4b695eb80a589213
Reviewed-on: https://chromium-review.googlesource.com/617224
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Andrii Shyshkalov 0d2dea0a5f git cl creds-check: special case parsing of chromium.org emails.
R=phajdan.jr@chromium.org

Change-Id: Ia1380bc0cfff50e82f9a26d3c54e9dc34a38c7b5
Reviewed-on: https://chromium-review.googlesource.com/574528
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 05bcb89b7e gclient flatten: preserve vars in pinned deps
Bug: 570091
Change-Id: I8c450da68fd36d166f8f838c645672fce7c03891
Reviewed-on: https://chromium-review.googlesource.com/610004
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr de86ab35fb gclient flatten: also preserve variables in deps_os entries
This is the same change as in https://chromium-review.googlesource.com/c/586594
applied to _DepsOsToLines.

Bug: 570091
Change-Id: I06a4dc3a9b6dbb001a15b1d7b88fef12cf6c6aaa
Reviewed-on: https://chromium-review.googlesource.com/609980
Reviewed-by: Emma Söderberg <emso@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 11eb715369 gclient flatten: do not add deps_os entries to deps, even with recursedeps
Bug: 570091
Change-Id: I8e67d617c2738459634aabbffd22135ee5d27cc4
Reviewed-on: https://chromium-review.googlesource.com/609065
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e2deb1efa2 gclient flatten: do not recurse into deps that should not be recursed
This finally makes the code structure seem right as well: there's just
one method (_flatten_dep), with a simpler control flow.

Also added a regression test.

Bug: 570091
Change-Id: I22ac7a3af0429a7ffd874b4b1715c0f6c72e0006
Reviewed-on: https://chromium-review.googlesource.com/608241
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr b0ad16ee41 gclient flatten: do not recurse into deps not in recursedeps
Nice side-effect of this change is simplifying the code.

Also added regression test coverage.

Bug: 570091
Change-Id: I470e9efc319632f997b02d210483988c17a7d3c8
Reviewed-on: https://chromium-review.googlesource.com/600369
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Takeshi Yoshino 07a6bea90f Expose ast via InputApi
To be used by https://chromium-review.googlesource.com/c/593708/

Bug:
Change-Id: I0d005bf6a6ba4262197a222cb337308551ed61a6
Reviewed-on: https://chromium-review.googlesource.com/595308
Commit-Queue: Takeshi Yoshino <tyoshino@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Aaron Gable 8b478f0406 PRESUBMIT: Be resilient to changes with no Code-Review label
Bug: 750694
Change-Id: I69778c3ea0789795ad7e50d11bf677df8f7bc262
Reviewed-on: https://chromium-review.googlesource.com/594839
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Dan Jacques 5aeeb72c33 [bootstraps] Sync at gclient, suppress output (#2)
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.

Update the tool boostraps to suppress any sort of syncing logs, if it
does happen. This will ensure that users who execute the tools don't see
unexpected output.

BUG=chromium:748651
TEST=local
  - Tested on Mac and Windows.

Change-Id: I1aad897d885a07beeac40a372a658681720efd2a
Reviewed-on: https://chromium-review.googlesource.com/591229
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr fc6196b306 gclient flatten: preserve variable placeholders (reland #1)
This is an exact reland of https://chromium-review.googlesource.com/583617 .

One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.

This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.

One of possible next steps might be to deprecate Var().

Bug: 570091, 748486
Change-Id: Id47e3771b7163149a4cd427b84f84ece52772f34
Reviewed-on: https://chromium-review.googlesource.com/586594
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Dirk Pranke 44855b9498 Revert "[bootstraps] Sync at gclient, suppress output."
This reverts commit 4d92fe4300.

Reason for revert: This moved the logging from invoking `led` or `vpython` to whenever someone would run something that would end up invoking `update_depot_tools`. It's good that we are calling this when we run update_depot_tools, but we probably should've suppressed the logging there in at least the success case, because now things are even more confusing. See crbug.com/748651.

Original change's description:
> [bootstraps] Sync at gclient, suppress output.
> 
> Have the "update_depot_tools" script also do a CIPD tool sync. This will
> ensure that users and systems have access to tooling at sync-time rather
> than just-in-time loading them at execution time.
> 
> Update the tool boostraps to suppress any sort of syncing logic, if it
> does happen. This will ensure that users who execute the tools don't se
> unexpected output.
> 
> BUG=None
> TEST=local
>   - Tested on Mac and Windows.
> 
> R=​dpranke@chromium.org, iannucci@chromium.org
> 
> Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
> Reviewed-on: https://chromium-review.googlesource.com/581494
> Commit-Queue: Daniel Jacques <dnj@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>

TBR=iannucci@chromium.org,dpranke@chromium.org,dnj@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: None
Change-Id: I2485c9dd2e48a8dbdeebfff5da9d4c708e0edcb7
Reviewed-on: https://chromium-review.googlesource.com/585867
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
8 years ago
Paweł Hajdan Jr. 393ba066ef Revert "gclient flatten: preserve variable placeholders"
This reverts commit e79ddeaabf.

Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=748486

Original change's description:
> gclient flatten: preserve variable placeholders
> 
> One of the main use cases is making it clear which revision hashes
> need to be changed together. The way it's usually done is one variable
> referenced several times. With this CL, we preserve the references
> from original DEPS, as opposed to evaluating them and losing some info.
> 
> This CL actually makes Var() emit a variable placeholder
> instead of its value, and adds support for these placeholders
> to gclient.
> 
> One of possible next steps might be to deprecate Var().
> 
> Bug: 570091
> Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
> Reviewed-on: https://chromium-review.googlesource.com/583617
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>

TBR=phajdan.jr@chromium.org,dpranke@chromium.org

Change-Id: If9c52ebfa78aba8041ce797ff842d09952d0e2ce
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 570091, 748486
Reviewed-on: https://chromium-review.googlesource.com/584907
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr e79ddeaabf gclient flatten: preserve variable placeholders
One of the main use cases is making it clear which revision hashes
need to be changed together. The way it's usually done is one variable
referenced several times. With this CL, we preserve the references
from original DEPS, as opposed to evaluating them and losing some info.

This CL actually makes Var() emit a variable placeholder
instead of its value, and adds support for these placeholders
to gclient.

One of possible next steps might be to deprecate Var().

Bug: 570091
Change-Id: I9b13a691b5203cc284c33a59438720e31c9ebf7a
Reviewed-on: https://chromium-review.googlesource.com/583617
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Dan Jacques 4d92fe4300 [bootstraps] Sync at gclient, suppress output.
Have the "update_depot_tools" script also do a CIPD tool sync. This will
ensure that users and systems have access to tooling at sync-time rather
than just-in-time loading them at execution time.

Update the tool boostraps to suppress any sort of syncing logic, if it
does happen. This will ensure that users who execute the tools don't se
unexpected output.

BUG=None
TEST=local
  - Tested on Mac and Windows.

R=dpranke@chromium.org, iannucci@chromium.org

Change-Id: I8efce8c73cc4e82ffdf5067ba9b917119a81e843
Reviewed-on: https://chromium-review.googlesource.com/581494
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Paweł Hajdan, Jr 357415cb11 gclient flatten: fix a bug with some recursedeps not being processed
Added a regression test. Simplified some logic - if we don't add os-specific
deps and hooks to |dependencies|, we don't need to keep separate original values.

Bug: 570091
Change-Id: I5bdd0b6a66df6b3a2b99d0ad9c6e54ee7114f09b
Reviewed-on: https://chromium-review.googlesource.com/581687
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
8 years ago
Aaron Gable ca01e2c8dc git cl issue 0: Remove Change-Id from message, not description
Using self.GetDescription() uses the description from the web.
Given that the user is purposefully disassociating their current
branch from the review on the web, they may have already changed
the commit message. We shouldn't set it back.

Bug: 742730
Change-Id: I0545cb6288c332fd475d1de7fb302f71ee41a415
Reviewed-on: https://chromium-review.googlesource.com/578229
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable fc62f76824 Simplify notify behavior in git-cl
Change-Id: I872658970c04cdadda2b0eaffd95e10717c09493
Reviewed-on: https://chromium-review.googlesource.com/575009
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 636b13fc3d Let Changelist().AddComment() mark changes as Ready
In Rietveld, adding a comment to a change automatically
published it no matter what. In Gerrit, we need to explicitly
mark the change as Ready for Review. This CL adds a new
parameter to the wrapper methods around the SetReview
API so that they can mark changes as Ready.

Bug: 740950
Change-Id: Icb2ad7c5beb03a4760657a761841745f0d75514e
Reviewed-on: https://chromium-review.googlesource.com/572031
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Matt Giuca 6bac8a8499 GitHyperBlameMainTest.testBadFilename: Work around git-blame bug.
A regression in git-blame prints an incorrect error message which causes
this test case to fail. Alter the test to only check the start of the
string, until the bug is fixed upstream.

Bug: 737688
Change-Id: I4045cb8792d8abe984215c7198e213b23e9f6f5d
Reviewed-on: https://chromium-review.googlesource.com/567778
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
8 years ago
Andrii Shyshkalov 22a9cf54c9 git_footers: fix bug stdin-based message input.
Also adds tests for the bug and for --json output.

R=agable@chromium.org, phajdan@chromium.org

Change-Id: I4e2208fdad8e23d48d27d0a354470336a7b86180
Reviewed-on: https://chromium-review.googlesource.com/570030
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Aaron Gable 400e989b1b 'git cl issue 0': Remove Change-Id
Although git-cl-upload warns when uploading a new patchset
to a change owned by someone else, if the uploader has run
'git cl issue 0', then git-cl believes they'll be uploading
a new change, so it doesn't bother checking. However, once
the upload begins, Gerrit notices the Change-Id in the commit
message, and instead adds a new patchset to someone else's
review (if the uploader is a committer).

This change introduces some logic to git-cl-issue to also
remove any Change-Id from the commit message when a user
tries to clear the metadata about their branch.

Bug: 741648
Change-Id: I6c7c3b24a7fc09c68220c8200b732fbdf9cf1fd3
Reviewed-on: https://chromium-review.googlesource.com/568267
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov c81738256b git cl creds-check: improve report and give better recommendation.
R=machenbach@chromium.org,agable@chromium.org
Bug: N/A
Change-Id: I831e9e72c8687c248022f49ea405e149538ef02a
Reviewed-on: https://chromium-review.googlesource.com/563671
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Dan Jacques 13f258bf05 Remove SVN bootstrapping and some tooling.
Remove Windows SVN bootstrapping and some SVN tooling. Since
"depot_tools" is no longer sync'd to SVN, and we have been committed to
Git for years now, this is obsolete. Any transition code will never
reach SVN users, and any remaining code should not be used by Chromium
developers.

BUG=chromium:630904
TEST=unit

Change-Id: Ie984e8400a748702b125eaeed8157719ef4b88cc
Reviewed-on: https://chromium-review.googlesource.com/562748
Commit-Queue: Daniel Jacques <dnj@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Paweł Hajdan, Jr 215ded779e Fix testFlattenPinAllDeps
This needs an update after simultaneous landing of
https://chromium-review.googlesource.com/c/561681/ and
https://chromium-review.googlesource.com/c/562138/ .

TBR=dpranke

Bug: 570091
Change-Id: I35ba4fa95ee97a8059eedf5ebf13b09b1c5ee89c
Reviewed-on: https://chromium-review.googlesource.com/563196
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 271a16809a gclient flatten: implement --pin-all-deps
Bug: 570091
Change-Id: Ibf7c6a73cab8bb777a7e4a8d958f085238c76450
Reviewed-on: https://chromium-review.googlesource.com/562138
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr fb02201796 gclient flatten: include vars
ChromeOS build depends on buildspec_platforms variable, see
https://bugs.chromium.org/p/chromium/issues/detail?id=703268 .

Bug: 570091
Change-Id: I9c964d332b45cf10f5cb79a82ea721bd4aba80d3
Reviewed-on: https://chromium-review.googlesource.com/561681
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Andrii Shyshkalov de37c01295 Fix git-numberer swallowing of footers for Rietveld.
Due to relaxation of when last paragraph of commit message is
is consider as containing footers, `git cl land` started removing
non-canonic footer lines from last paragraph if Git Numberer is enabled
on a repo. This only manifests in manual lands of Rietveld CLs or
bypassing code review entirely.

R=agable@chromium.org
Bug: 736852
Change-Id: I3972c590c3959974157ada9de9891a3c08bd385a
Reviewed-on: https://chromium-review.googlesource.com/562278
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Paweł Hajdan, Jr c6846aa200 gclient flatten: fix a bug with deps_os getting omitted for recursed deps
Bug: 570091
Change-Id: I4fac33ca683ff2011fa7307d5175592f3d9e258e
Reviewed-on: https://chromium-review.googlesource.com/560171
Reviewed-by: Michael Moss <mmoss@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 6014b56642 gclient flatten: also handle allowed_hosts
Bug: 570091
Change-Id: I96417d462efb3b0476ee17d42ac5f19d8c4f99c3
Reviewed-on: https://chromium-review.googlesource.com/558352
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Aaron Gable 897bf0b083 git-drover: send mail and don't use WIP mode
R=avayvod

Bug: 738116
Change-Id: Idd1ea46dfd876b800868bba9cc981a4093e1c809
Reviewed-on: https://chromium-review.googlesource.com/556302
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Commit-Queue: Andrew Bonventre <andybons@chromium.org>
8 years ago
Paweł Hajdan, Jr 5b593358a9 gclient flatten: skip empty fields
Bug: 570091
Change-Id: Ib1a86289f8219ead789e19896c2a873b8d59c179
Reviewed-on: https://chromium-review.googlesource.com/556035
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Michael Moss 017bcf67d9 Fix flattened hooks_os list formatting.
R=dpranke@chromium.org, phajdan.jr@chromium.org

Bug: 570091
Change-Id: Ic2aa1a9fe18f3fe8d5aa6fa4c4e9269106b36092
Reviewed-on: https://chromium-review.googlesource.com/553719
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Di Mu <dimu@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Aaron Gable 844cf2963b git-cl: only set WIP on first upload
It seems like some folks are confused by additional patchsets
after the first putting the change back into WIP mode. This
confusion is honestly understandable. Maybe we try only setting
it on the very first upload, and just controlling the notify
parameter for future patchsets.

Bug: 721836, 737675
Change-Id: If56e5c71e0c6b3b46c2e30ac0b6d80b878218181
Reviewed-on: https://chromium-review.googlesource.com/552779
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: smut <smut@google.com>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Nico Weber c833946a1f Remove const NSObject global presubmit.
I added this when we were moving from gcc to clang on OS X many years
ago.  Now that gcc has been deprecated on mac for many years, this
is safe to remove (clang errors on this pattern).

This check took 0.6s during `git cl presubmit` on a recent change of
mine, so it should speed presubmit up a bit.

Bug: none
Change-Id: Ia29b046807582e056115519fb5b34ee8a1b9ff91
Reviewed-on: https://chromium-review.googlesource.com/553238
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Nico Weber <thakis@chromium.org>
8 years ago
Aaron Gable afd5277778 git-cl-upload: make it possible to exit WIP mode
The previous CL forgot that the lack of '%wip' doesn't
mark a change ready-to-review, you have to explicitly pass
'%ready' in the refspec to do that.

TBR=tandrii@chromium.org

Bug: 721836
Change-Id: Iea82222d64edf1b73fefa9bca3feec4188e35ab3
Reviewed-on: https://chromium-review.googlesource.com/551005
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 70f4e24d15 git-cl: upload changes in WIP unless --send-mail
Work-In-Progress is a new change flag that can be set on
Gerrit changes. While a change is in WIP mode, certain things
are different:
* It doesn't send emails except to the change owner
* The "Reply" button becomes "Start Review"
* When a change is moved out of WIP, it sends a special
  "ready for review" message to any new reviewers
This is much more similar to the Rietveld model, where users
would "Publish" their changes for the reviewers to look at.

Bug: 721836
Change-Id: I3b9697e311fa176cb679ecefbfead9bb32b6afaf
Reviewed-on: https://chromium-review.googlesource.com/549015
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Paweł Hajdan, Jr 96e1d78830 gclient flatten: add support for hooks_os
Bug: 570091
Change-Id: Ia7f81a81d7df75004c5f8b7560dfd50a14f4cddd
Reviewed-on: https://chromium-review.googlesource.com/549355
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Michael Moss <mmoss@chromium.org>
8 years ago
Paweł Hajdan, Jr ad30de6389 gclient flatten: syntax and schema fixes from actual testing
Bug: 570091
Change-Id: Iae9dad68a75d751ceac6379baac588f32c59aa06
Reviewed-on: https://chromium-review.googlesource.com/548935
Reviewed-by: Michael Moss <mmoss@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 032d545947 gclient: implement conditions for hooks
Bug: 570091
Change-Id: I5a489f9f9cbc5384b720685264aa918573234cf5
Reviewed-on: https://chromium-review.googlesource.com/544965
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr fd0057e42b gclient: include deps_os entries in dependencies (reland #1)
This is a reland of https://chromium-review.googlesource.com/c/541280/
with a fix for https://bugs.chromium.org/p/chromium/issues/detail?id=735418
(patchset 1 is original patch, patchset 2 has the fix).

Keep deps_os entries in dependencies, just with should_process set to False
for entries not applicable to target OS list.

This way gclient flatten has proper access to dependencies e.g. to evaluate
recursedeps referring to deps_os entries other than active OS.

Allow but ignore deps_os overriding a value with None, since that does not
fit the new model. There's no correctness harm in not checking out a repo.

Allow "overrides" setting given dependency to the same value. This seems
fairly common, especially for mac/ios and unix/android, even in chromium/src.

Bug: 570091, 735418
Change-Id: I6eba0e4be202212eb86cb959c18f2b2f0c1452b9
Reviewed-on: https://chromium-review.googlesource.com/543076
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 806b70187d Revert "gclient: include deps_os entries in dependencies"
This reverts commit 529d6a4e4a.

Reason for revert: broke developers and CI/Try checkouts.

Bug: 735418

Original change's description:
> gclient: include deps_os entries in dependencies
> 
> Keep deps_os entries in dependencies, just with should_process set to False
> for entries not applicable to target OS list.
> 
> This way gclient flatten has proper access to dependencies e.g. to evaluate
> recursedeps referring to deps_os entries other than active OS.
> 
> Allow but ignore deps_os overriding a value with None, since that does not
> fit the new model. There's no correctness harm in not checking out a repo.
> 
> Allow "overrides" setting given dependency to the same value. This seems
> fairly common, especially for mac/ios and unix/android, even in chromium/src.
> 
> Bug: 570091
> Change-Id: I2037a1ecc5fd2da6b5f73061548b81fc79ba2e72
> Reviewed-on: https://chromium-review.googlesource.com/541280
> Reviewed-by: Dirk Pranke <dpranke@chromium.org>
> Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>

TBR=phajdan.jr@chromium.org,dpranke@chromium.org

Change-Id: Iaa0c39865908a5b25c15dda54ba61c0e76abcbea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 570091
Reviewed-on: https://chromium-review.googlesource.com/543138
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Paweł Hajdan, Jr 529d6a4e4a gclient: include deps_os entries in dependencies
Keep deps_os entries in dependencies, just with should_process set to False
for entries not applicable to target OS list.

This way gclient flatten has proper access to dependencies e.g. to evaluate
recursedeps referring to deps_os entries other than active OS.

Allow but ignore deps_os overriding a value with None, since that does not
fit the new model. There's no correctness harm in not checking out a repo.

Allow "overrides" setting given dependency to the same value. This seems
fairly common, especially for mac/ios and unix/android, even in chromium/src.

Bug: 570091
Change-Id: I2037a1ecc5fd2da6b5f73061548b81fc79ba2e72
Reviewed-on: https://chromium-review.googlesource.com/541280
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Paweł Hajdan, Jr 66945379c6 gclient: throw errors if values from deps_os override deps
With 'flatten' work and in general, we assume deps_os only add to deps,
without attempting to override entries there.

This removes significant edge cases from flatten code,
and ensures DEPS are easier to reason about.

This reverses some past patches and decisions:

a0ad8ad9c9
https://codereview.chromium.org/11368067
https://bugs.chromium.org/p/chromium/issues/detail?id=157979

ed2b4fe59b
https://codereview.chromium.org/23875029
https://bugs.chromium.org/p/chromium/issues/detail?id=248168

These are rather old though (2012-2013), and not expected to be used.

Bug: 570091
Change-Id: I143e95bdaef9d10c937a5f678e6be7e26899ad4d
Reviewed-on: https://chromium-review.googlesource.com/531029
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago
Aaron Gable 62619a3811 git-cl-patch: Return to cherry-pick, but hard reset with --force
This is a partial revert of https://chromium-review.googlesource.com/c/527345/
Turns out more people were confused by the new behavior than
expected, so we're returning to "cherry-pick" being the default,
but supporting the collaboration workflow is important, so we're
adding a warning message and support for "reset --hard" behind a
pre-existing flag.

Bug: 723787
Change-Id: Ib6038a42e3bdcc0db93c1f32d759e9ff0e91a065
Reviewed-on: https://chromium-review.googlesource.com/538137
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Paweł Hajdan, Jr c93643954d gclient: add cwd support for hooks
This makes it possible to run hooks properly
in flattened DEPS.

Bug: 570091
Change-Id: If8175a57ebe8f607bd4ac83d4a26dcc4cc18165c
Reviewed-on: https://chromium-review.googlesource.com/535476
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
8 years ago