Commit Graph

708 Commits (94580ab035eb3d05e352dc9c16b4908e9f744579)

Author SHA1 Message Date
Andrii Shyshkalov eadad92e4a git cl try: reduce number of RPCs to Gerrit from 3 to 1.
R=agable@chromium.org
BUG=681704

Change-Id: I3c0ab781e0357e0855d50157c5653df57f68ac9a
Reviewed-on: https://chromium-review.googlesource.com/432336
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 8039be7cc8 git cl: reduce number of Gerrit RPCs in status check.
Also fixes git cl description <url> by propagating codereview host information
in all cases.

BUG=681704
R=agable@chromium.org

Change-Id: Ia79c10b19d72b5a8797a1428ad8a79c8f4480901
Reviewed-on: https://chromium-review.googlesource.com/431036
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 1090fd5b69 Fix git cl upload --dependencies for Gerrit.
BUG=640299
R=rmistry@chromium.org,agable@chromium.org

Change-Id: Iac987758065c57a4a08ce98f838fc0c30a8c1a02
Reviewed-on: https://chromium-review.googlesource.com/432676
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 1897532850 Python style fixes + unused imports removal in git cl and friends.
R=sergiyb@chromium.org
BUG=

Change-Id: I9b886100557bf6efa9be07d40175f7bb919f5294
Reviewed-on: https://chromium-review.googlesource.com/432456
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 98cef5704b git cl: _RietveldChangelistImpl should always have non-None auth_config.
TBR=phajdan.jr@chromium.org,sdefresne@chromium.org

Change-Id: I95cc6e61d044fd983c613fa7eeb21c8b77d7cee0
Reviewed-on: https://chromium-review.googlesource.com/432356
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov f3a20aed82 git cl: remove code related to pending refs and gnumbd.
Refactor _GitNumbererState to two functions and remove no longer
useful tests.

BUG=644915
R=agable@chromium.org

Change-Id: If5e3e3b141aee192211f6af130b01f20f9afdbfe
Reviewed-on: https://chromium-review.googlesource.com/431976
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 9c3a464bf7 For Gerrit: use CURRENT_COMMIT option to get description, not gitiles.
R=sergiyb@chromium.org
BUG=681704

Change-Id: I48804955d8e5e579eae6e60fccac304aaaa9230e
Reviewed-on: https://chromium-review.googlesource.com/430625
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Christopher Lam f732cd5c70 Add cl description backup to gerrit upload.
BUG=684261

Change-Id: I2716864526fcedf44e561be8512843e12810e3a9
Reviewed-on: https://chromium-review.googlesource.com/431459
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Christopher Lam c5ba692d1e Put git cl format JS formatting behind a flag.
This CL moves JS formatting behind the --js flag for git cl format
due to issue with LayoutTests. It also adds an option to check
javascript for the presubmit canned formatting check.

BUG=567770

Change-Id: I9c080b1136f6ffef9fb1b08d3bfc97ce5b3185dc
Reviewed-on: https://chromium-review.googlesource.com/430526
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Christopher Lam <calamity@chromium.org>
8 years ago
Andrii Shyshkalov d0e1d9d9c5 git cl status: re-use existing ChangeList object.
This way we avoid extra RPC to codereview site.

R=sergiyb@chromium.org
BUG=681704

Change-Id: I81f9ac1b8fe4cfaa95458a5669735168185c47e5
Reviewed-on: https://chromium-review.googlesource.com/430639
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
Andrii Shyshkalov 258e0a653c Gerrit git cl: cache change detail to save on RPC calls.
R=sergiyb@chromium.org
BUG=681704

Change-Id: I5c320f7e6442a92ae0574e2ca6481a082e82568a
Reviewed-on: https://chromium-review.googlesource.com/430795
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
Andrii Shyshkalov 2f8e924184 git cl status: use smarter parallel processing.
Previously, 1 CL was queried first, followed by all remaining ones
in parallel. The purpose was to ensure that valid authentication
token is present. However, it still required one call to Rietveld
or Gerrit, needlessly increasing latency.

This CL first loops over all CLs and ensures that credentials are
present, refreshing refresh tokens for Rietveld if necessary. Then,
all CLs are queried in parallel.

R=sergiyb@chromium.org,clemensh@chromium.org
BUG=681704

Change-Id: Ic125ac7c2a684d6f3c34e4e8b899192abbed01bb
Reviewed-on: https://chromium-review.googlesource.com/431033
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable 856585ddec Only prompt for clean titles if manually set
We have to clean up the title, but if the user hasn't expressed any
input about the title (i.e. it's one we autogenerated), then don't
bother them by pointing it out.

BUG=684079

Change-Id: I8215e0a30f786466697fe1df178ca90e1980d9b0
Reviewed-on: https://chromium-review.googlesource.com/431162
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 5b04a57ab2 git cl + gerrit_util: improve diagnostic logging.
BUG=681704

Change-Id: I1a774350aea901d4e9f2468cff111cbbcd7f3388
Reviewed-on: https://chromium-review.googlesource.com/430794
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
Andrii Shyshkalov 351c61da20 Fix git cl on windows for git-numberer repos.
Git cl decides if git-numberer is enabled on a repository by writing
Gerrit's project.config from refs/meta/config into a tempfile, which is
then queried using `git config -f tempfile --get ...`.  The file itself
is only flushed, but not closed after writing because Python's
tempfile.NamedTemporaryFile is deleted on closing. This worked fine on
Linix/Mac, but not on Windows, where `git config` apparently doesn't see
file or its contents.

This CL rewrites the above using yet another contexmanager temp
directory into which a file is written and closed before git config is
ran.

R=machenbach@chromium.org,grt@chromium.org
BUG=683202

Change-Id: I7974d66b1b2b0478ab4b6f7ac04e547a4981c46c
Reviewed-on: https://chromium-review.googlesource.com/430719
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Vadim Shtayura <vadimsh@chromium.org>
8 years ago
Aaron Gable e447411c4e Remove unused FORCE_HTTPS_COMMIT_URL parameter from git-cl
BUG=

Change-Id: Ib8953a7fea4e3cd1c17ea277b5310a31821bfbe8
Reviewed-on: https://chromium-review.googlesource.com/431050
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Christopher Lam 06dba1b159 Add JS to git cl format.
This CL adds .js to the list of file extensions that get clang-formatted.

BUG=567770

Change-Id: Ieed162a84ca68877e5107da1824b1f49c71d51ed
Reviewed-on: https://chromium-review.googlesource.com/429551
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Dan Beam <dbeam@chromium.org>
8 years ago
Aaron Gable 59f4851751 Don't send email to CCs by default on initial upload
It looks like this regressed when we switched from specifying CCs
via the refspec arguments to using the API.

BUG=680605

Change-Id: Iabd397b639989f050932188b1a1aa488639ffbbe
Reviewed-on: https://chromium-review.googlesource.com/427344
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable b56ad33d00 Respect -t/--title in initial cl uploads to Gerrit
BUG=674254

Change-Id: Icdc572648dfffeca7e28f327e085f64985221ce9
Reviewed-on: https://chromium-review.googlesource.com/425823
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable 4874665738 Make upstream reupload error message clearer
BUG=643466

Change-Id: I6e27334401d541fc4b7b3196465497cab1a78029
Reviewed-on: https://chromium-review.googlesource.com/424968
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Daniel Cheng c55eecf76b Make git cl format work with relative paths arguments.
BUG=none

Change-Id: I6864a8ac16393410280f8cdd38719b02a81f6ce1
Reviewed-on: https://chromium-review.googlesource.com/424147
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Daniel Cheng <dcheng@chromium.org>
8 years ago
Asanka Herath 7c61dcb36e [git-cl] Preserve line breaks when pretty printing CL description.
Also set the line wrap limit to 72 + indent from 70 columns total. The
latter was limiting the CL description to 68 columns total before
wrapping kicked in.

BUG=none

Change-Id: I93c984c7b121d4bb042d0dc81a662352f77df4d1
Reviewed-on: https://chromium-review.googlesource.com/420243
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
8 years ago
Aaron Gable 1bc7bfe5d9 Remove SVN (and dcommit) support from git-cl
BUG=638750

Change-Id: I9ebe4ff861a37433209b66f4050370b49f17cdc7
Reviewed-on: https://chromium-review.googlesource.com/419661
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 7d51883926 Gerrit git cl upload: don't print stacktrace on failed git push.
R=agable@chromium.org,hinoka@chromium.org
BUG=674291

Change-Id: Ie71747fd40c171c18687e299032fe826d4d3ae32
Reviewed-on: https://chromium-review.googlesource.com/420723
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Daniel Jacques <dnj@chromium.org>
8 years ago
Quinten Yearsley b2cc4a94da depot_tools: Replace pylint error numbers with symbolic names.
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.

The purpose is to slightly improve readability of pylint
disable comments.

Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
8 years ago
Quinten Yearsley 442fb64cab depot_tools: Run automatic spell-checker.
Specifically, this CL was made by running codespell
(https://github.com/lucasdemarchi/codespell), manually filtering
for changes in non-third-party files that appear correct.

Change-Id: Ia16c1b29483d777744450d7bea45a178cf877a25
Reviewed-on: https://chromium-review.googlesource.com/420871
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 9b713dd18b Generate patchset name from commit subject
This is a reland of 947f2ee808,
which was reverted in a5a1eea537

BUG=672332

Change-Id: If33c54e500fbeac11f60d81a19549880506c63d8
Reviewed-on: https://chromium-review.googlesource.com/419737
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 02cdbb45a7 Fix gerrit/gitiles typo in git_cl
This is a fix to 32978d969c,
which introduced a "Landed as <gerrit link>" feature to git-cl, but
which at the last minute introduced a typo causing the whole feature
to not actually work.

BUG=661187

Change-Id: Ifef3379a51f035973bc5f3842862528f90bfdf84
Reviewed-on: https://chromium-review.googlesource.com/419782
Reviewed-by: Stephen Martinis <martiniss@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov b5effa1f24 git cl + git numberer: fix 3+ lineage ordering.
In other words, end 2 end test was a really awesome idea.

R=machenbach@chromium.org,sergiyb@chromium.org
BUG=642493
TEST=git cl land of https://codereview.chromium.org/2575043003 succeeded

Change-Id: I568ce79baf109b2aa556e4343527b63f39c10d00
Reviewed-on: https://chromium-review.googlesource.com/419478
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 8f15f3ec1d git cl refactor: s/should_git_number/should_add_git_number
R=sergiyb@google.com
BUG=chromium:642493

Change-Id: Id7b732d82c25ce88a3295ff54c79cf2a66e0d5b9
Reviewed-on: https://chromium-review.googlesource.com/419437
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov a5a1eea537 Revert "Generate patchset name from commit subject"
This reverts commit 947f2ee808.

Reason for revert: unnecessarily sets the title for the first upload,
which isn't done for Rietveld.

Original change's description:
> Generate patchset name from commit subject
> 
> BUG=672332
> 
> Change-Id: If9c662f11b217a52cac7c9c47ad9f3d978148c2e
> Reviewed-on: https://chromium-review.googlesource.com/419330
> Commit-Queue: Aaron Gable <agable@chromium.org>
> Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
> 

TBR=agable@chromium.org,tandrii@chromium.org,chromium-reviews@chromium.org
BUG=672332
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: I9dcec1b02c8f16ceca8338acef4a1fc174aef35c
Reviewed-on: https://chromium-review.googlesource.com/419517
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable 947f2ee808 Generate patchset name from commit subject
BUG=672332

Change-Id: If9c662f11b217a52cac7c9c47ad9f3d978148c2e
Reviewed-on: https://chromium-review.googlesource.com/419330
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 828701bdf3 Gerrit: git cl set-commit -d: don't spam reviwers/owner.
R=sergiyb@chromium.org,machenbach@chromium.org
BUG=

Change-Id: Ia89e91479c22adeebc85a4432cd9f7b8d95a8fde
Reviewed-on: https://chromium-review.googlesource.com/418655
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov f01be229a7 git cl: insert "Review-Url" instead "Review URL" footer like CQ.
R=sergiyb@chromium.org

Change-Id: I2df867e381ceb1035add84563d3b444b0ee0ea94
Reviewed-on: https://chromium-review.googlesource.com/417267
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 768f1d88a0 git cl: use gnumbd config instead of PENDING_REF_PREFIX of codereview.settings.
BUG=chromium:642493,672043
R=machenbach@chromium.org,iannucci@chromium.org

Change-Id: I0abc31b95b1766fd5fd24c1379b538d0c5291011
Reviewed-on: https://chromium-review.googlesource.com/417259
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov cd6a9363ef git_cl: add GitNumbererState in preparation to stop gnumbd service.
The new class is unused and doesn't change any existing functionality.

BUG=chromium:642493
R=machenbach@chromium.org,iannucci@chromium.org

Change-Id: Id3fe71b07b694339f0a620b427816e52560069d8
Reviewed-on: https://chromium-review.googlesource.com/416430
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov a6695810bb git cl replacing gnumbd: set correct committer timestamp.
BUG=642493
R=sergiyb@chromium.org

Change-Id: I5d8588f2b6f30368188aecab2d2c462a11aa6883
Reviewed-on: https://chromium-review.googlesource.com/414369
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Andrii Shyshkalov 15e50cc5c4 git cl: implement git number footer generation.
BUG=642493

Change-Id: Ic8eb121b0ad7adcc7a3f3f1967ef2261f415e731
Reviewed-on: https://chromium-review.googlesource.com/414466
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
9 years ago
Andrii Shyshkalov ea4fc839ce Gerrit git cl desc: don't notify reviwers.
R=agable@chromium.org
BUG=644101
TEST=manual

Change-Id: I82b7209981a834c8f26d65d2701d665a4eb2ba51
Reviewed-on: https://chromium-review.googlesource.com/415829
Reviewed-by: Aaron Gable <agable@chromium.org>
9 years ago
Sergiy Byelozyorov 935b93fb9b Only add master. prefix unless one is already specified
BUG=668162

Change-Id: Ie38542eb4627aa8c07adf9d2665b80cdcee2758f
Reviewed-on: https://chromium-review.googlesource.com/414355
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
Aaron Gable a45ee11d6e Use 'change' instead of 'issue' when talking about Gerrit CLs
Change-Id: I17884d9ef7efdaf75ed575e66aca1034db0672b5
Reviewed-on: https://chromium-review.googlesource.com/413289
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
9 years ago
Andrii Shyshkalov b8c535f696 Use codereview.settings style for GENERATE_GIT_NUMBER_FOOTERS.
R=sergiyb@chromium.org
BUG=642493

Change-Id: Ic4acf4076fdf27c1ed5e75f0ed1dda4b16d675fc
Reviewed-on: https://chromium-review.googlesource.com/414469
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
Andrii Shyshkalov 5fb4774810 git cl: rework setting to auto-generate git number footers.
BUG=642493

Change-Id: I1c83c54f7ad938cf4abeadb42f8d9414521d6dc5
Reviewed-on: https://chromium-review.googlesource.com/414465
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
Andrii Shyshkalov 813ec3c322 git cl land + gnumbd: add asserts.
BUG=642493

Change-Id: Ib1234922e4bcd4ee286fffb8f7c637e4d2442a42
Reviewed-on: https://chromium-review.googlesource.com/414504
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
9 years ago
Andrii Shyshkalov 06a2502fc9 git cl land: add test expectations for Rietveld.
This is preperatory work for Cr- footers generation in git cl instead
of gnumbd.

BUG=642493

Change-Id: I4cfdd882fe6caa7972e51ffa81d335104ddb56dd
Reviewed-on: https://chromium-review.googlesource.com/414464
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
9 years ago
Aaron Gable 5db8209d92 Don't return 1 when failing to add Gerrit CCs
This causes other automated tooling to think that the entire
upload has failed, when really only a small part of it has.

BUG=666160

Change-Id: I0d646e77c54330d642097aebe70ec145ae291267
Reviewed-on: https://chromium-review.googlesource.com/412281
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
Andrii Shyshkalov 3aac775665 Gerrit git cl land: tell user how to abort.
R=friedman@chromium.org,andybons@chromium.org
BUG=665623

Change-Id: I419c6c01839fd761b1941fdf002fe39769cc1e17
Reviewed-on: https://chromium-review.googlesource.com/411761
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
Ravi Mistry fda50ca02d Skip checking local vs remote patchset for Gerrit
BUG=chromium:664520

Change-Id: Idd5855e14f6237577b351ff51582335996522417
Reviewed-on: https://chromium-review.googlesource.com/399118
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
9 years ago
scottmg b84b5e3a13 Don't --find-copies-harder when printing informational diff, either
We're doing the diff twice afaict, once to print stats to the user, and
once to actually do the upload. Definitely no need to
--find-copies-harder in the print.

Previously: https://codereview.chromium.org/2488823002.

R=dpranke@chromium.org
BUG=544889

Review-Url: https://codereview.chromium.org/2489963003
9 years ago
Andrii Shyshkalov c6c8b4c99b presubmit_support for Gerrit: don't ignore 404.
Before, presubmit_support would fail with not very useful stacktrace if
Gerrit returns 404, which is usually due to missing/invalid credentials.

This CL fixes that and improves the exception message, and also improves
logic in git_cl.

R=agable@chromium.org
BUG=

Change-Id: Iae8f0c24422c46af70929c7d5d71993164887511
Reviewed-on: https://chromium-review.googlesource.com/409650
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
9 years ago
Aaron Gable df86e30194 Clean up gerrit_util's handling of unknown reviewer/cc
This is still important, but at least now it won't result
in a stacktrace.

Change-Id: If6e7e15a98b0a03df7e978201762fea670312ede
Reviewed-on: https://chromium-review.googlesource.com/408660
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
9 years ago
nodir e4f0fe02a9 fix git-cl-try without parameters
Master names were confused with bucket names

R=tandrii@chromium.org, qyearsley@chromium.org
BUG=661580

Review-Url: https://codereview.chromium.org/2482523002
9 years ago
tandrii 8c5a353e63 Implement and test git cl try for Gerrit.
R=borenet@chromium.org,qyearsley@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2468263005
9 years ago
agable 32978d969c git-cl-land: print url of final commit location
BUG=661187

Review-Url: https://codereview.chromium.org/2466953003
9 years ago
qyearsley 136b49ff7e depot_tools: Remove DoGetTrySlaves, GetTrySlavesExecuter, GetPreferredTrySlaves
Note: This CL originally just removed a deprecated use of Remove use of DoGetTrySlaves, suggested in http://crrev.com/2442153002, then was expanded to remove DoGetTrySlaves, GetPreferredTrySlaves and GetTrySlavesExecuter since these are all deprecated and unused.

BUG=660453

Review-Url: https://codereview.chromium.org/2453823002
9 years ago
qyearsley dd49f94cc5 git cl try: Simplify _get_bucket_map.
Assuming that assuming bots are always just builder names, and they're never specified along with tests in git cl --bot options, then some logic used for git cl try can be removed.

Review-Url: https://codereview.chromium.org/2448193006
9 years ago
qyearsley 123a468d14 git cl try: support multiple bots from different masters without specifying master.
It might be good to make this change after the refactoring CL http://crrev.com/2442153002.

BUG=640740

Review-Url: https://codereview.chromium.org/2439293002
9 years ago
qyearsley 5eb0519b4c git cl try: Remove --name option, stop sending "reason" property.
When triggering the build, there's a field called "reason",
which is currently populated by default with the user's
branch name.

I have a feeling that this is optional and could be completely
omitted.

Andrii notes that if users want to send a "reason" string,
they could send invoke git cl try with the argument -p reason="<reason>".

PSA on infra-dev:
https://groups.google.com/a/chromium.org/d/msg/infra-announce/PXkM1WinTYY/w2IvN5B4AwAJ

BUG=659552

Review-Url: https://codereview.chromium.org/2428383010
9 years ago
qyearsley 1fdfcb6316 Refactoring: Extract helper functions from CMDtry in git_cl.py.
The purpose of this change is to prepare for modifying git cl try
so that builders on multiple masters can be triggered in one invocation
(http://crbug.com/640740).

This should not affect behavior; this CL makes several non-essential
changes to formatting and comments.

Review-Url: https://codereview.chromium.org/2442153002
9 years ago
nodir 70d11c3759 git_cl: fix GetPreferredTryMasters() feature
It was broken in https://chromiumcodereview.appspot.com/2419113002

R=borenet@chromium.org
BUG=658317

Review-Url: https://codereview.chromium.org/2442393002
9 years ago
skobes 6468b9068b Make git cl patch work with binary files.
BUG=557512

Review-Url: https://codereview.chromium.org/2445543002
9 years ago
qyearsley 99e2cdf47a Print failure reason when git cl try can't trigger jobs on a CL.
This is a very little fix.

Review-Url: https://codereview.chromium.org/2441213002
9 years ago
bradnelson d975b30c20 Automatically CC folks listed in CC= lines.
Detect CC=<users> lines the way we detect R= and TBR=.
Add these as CC'ed users for rietveld and gerrit.

R=iannucci@chromium.org,hinoka@chromium.org,dnj@chromium.org

Review-Url: https://codereview.chromium.org/2433323004
9 years ago
borenet 6c0efe6050 Add -B/--bucket flag to git-cl try
BUG=

Review-Url: https://chromiumcodereview.appspot.com/2419113002
9 years ago
tandrii 2a16b95eb1 git cl: refactor direct usage of time.sleep and time.time.
R=machenbach@chromium.org

Review-Url: https://chromiumcodereview.appspot.com/2433813004
9 years ago
Dan Jacques 78de30e1bb Revert "git_cl: Allow server overriding."
This reverts commit a8fb3a2892.
9 years ago
Dan Jacques a8fb3a2892 git_cl: Allow server overriding.
BUG=chromium:657064
TEST=local
  - Ran "git cl status" during outage with override, works.

R=tandrii@chromium.org

Review URL: https://chromiumcodereview-hr.appspot.com/2425673005 .
9 years ago
tandrii 48df58136d Gerrit git cl: make it work with minimal file.
BUG=656555
R=emso@chromium.org,andybons@chromium.org

Review-Url: https://codereview.chromium.org/2421253002
9 years ago
rmistry c9ebbd2463 Fix logic to detect Gerrit CL in CQ
BUG=chromium:656042

Review-Url: https://codereview.chromium.org/2419123002
9 years ago
tandrii de281aee41 git cl try: make code less Rietveld-specific.
This also adds first test to cover case of custom properties.

R=machenbach@chromium.org,sergiyb@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2409223002
9 years ago
tandrii e113dfd7a1 git cl try: refactor to add Gerrit support in the future.
R=nodir@chromium.org,sergiyb@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2400713003
9 years ago
tandrii 568043bdd9 git cl try: remove --use-rietveld and related code.
R=nodir@chromium.org,sergiyb@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2401943002
9 years ago
tandrii 45b2a5891a git cl try-results regression tests for Gerrit.
The flow looks like this:

  $ git cl status
  Branches associated with reviews:
    gerrit-4483 : https://chromium-review.googlesource.com/381231 (waiting)

  $ git cl try-results
  Warning: Codereview server has newer patchsets (2) than most recent
  upload from local checkout (None). Did a previous upload fail?
  By default, git cl try uses latest patchset from codereview,
  continuing using such patchset 2.

  Warning: Some results might be missing because You are not logged in.
  Please login first by running:
    depot-tools-auth login chromium-review.googlesource.com
  Started:
    Infra Linux Precise 32 Tester https://luci-milo.appspot.com/swarming/...
    Infra Linux Trusty 64 Tester  https://luci-milo.appspot.com/swarming/...
  Total: 2 try jobs

  $ depot-tools-auth login chromium-review.googlesource.com
   <<<auth in my browser>>>

  Logged in to chromium-review.googlesource.com as <some@email.com>

	To login with a different email run:
		depot-tools-auth login chromium-review.googlesource.com
	To logout and purge the authentication token run:
		depot-tools-auth logout chromium-review.googlesource.com

  $ git config branch.gerrit-4483.gerritpatchset 2
  $ git cl try-results
  Started:
    Infra Linux Precise 32 Tester https://luci-milo.appspot.com/swarming/...
    Infra Linux Trusty 64 Tester  https://luci-milo.appspot.com/swarming/...
    Infra Mac Tester              https://luci-milo.appspot.com/swarming/...
  Total: 3 try jobs

R=sergiyb@chromium.org,emso@chromium.org
BUG=599931
TEST=new unittests + end-to-end local.

Review-Url: https://codereview.chromium.org/2392463009
9 years ago
tandrii c2405f5545 git cl patch: handle missing/wrong Gerrit issue better.
No stacktrace is printed, instead just a user-friendly string is shown.
Add test + some tests refactoring.

This CL also improve missing Gerrit issue exception elsewhere by raising
user-friendly exception.

BUG=654360
R=sergiyb@chromium.org
TEST=manual

Review-Url: https://codereview.chromium.org/2403793002
9 years ago
tandrii 8e22954683 git cl try: --use-rietveld no longer supported.
R=nodir@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2399993004
9 years ago
tandrii f7b29d4a6d Refactor git cl try.
R=phajdan.jr@chromium.org,sergiyb@chromium.org
BUG=599931

Review-Url: https://codereview.chromium.org/2400793004
9 years ago
tandrii 221ab25f46 git cl try-results: refactor Rietveld + add tests.
R=emso@chromium.org,phajdan.jr@chromium.org
BUG=599931
TEST=new teste + local end-to-end

Review-Url: https://codereview.chromium.org/2395113002
9 years ago
tandrii 1838bade43 git cl: style cleanup.
R=emso@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2393253002
9 years ago
tandrii 8818977467 Reland of Add CC_LIST and --cc to Gerrit issues via API to be similar to CCs in Rietveld
Originally landed as issue 2378703002 at patchset 60001
(http://crrev.com/2378703002#ps60001).

BUG=chromium:649660
TBR=rmistry@chromium.org

Review-Url: https://codereview.chromium.org/2376323002
9 years ago
tandrii 31d165a5c1 Revert of Add CC_LIST and --cc to Gerrit issues via API to be similar to CCs in Rietveld (patchset #4 id:60001 of https://codereview.chromium.org/2378703002/ )
Reason for revert:
Actually, it doesn't break uploads, add cc-ed emails post-upload fails with exception and confuses users, and I couldn't find workaround.

Original issue's description:
> Add CC_LIST and --cc to Gerrit issues via API to be similar to CCs in Rietveld
>
> BUG=chromium:649660
>
> Committed: 3574740929

TBR=rmistry@google.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:649660

Review-Url: https://codereview.chromium.org/2375393002
9 years ago
rmistry 3574740929 Add CC_LIST and --cc to Gerrit issues via API to be similar to CCs in Rietveld
BUG=chromium:649660

Review-Url: https://codereview.chromium.org/2378703002
9 years ago
stip 7a3dd3570e Change usage of deprecated flag.
BUG=Every time I run 'git cl upstream' I get "The --set-upstream flag is deprecated and will be removed. Consider using --track or --set-upstream-to."

Review-Url: https://codereview.chromium.org/2352393003
9 years ago
agable 3b9a5bb84f Delete git-auto-svn and its docs
We no longer support git-svn as a workflow.

R=iannucci@chromium.org
BUG=475320

Review-Url: https://codereview.chromium.org/2360143002
9 years ago
rmistry 9eadede7df Add ability to set topic during "git cl upload"
BUG=chromium:628237

Review-Url: https://codereview.chromium.org/2343363003
9 years ago
tandrii bf42940536 git cl land to refs/pending: remove unused arg.
R=iannucci@chromium.org
BUG=642493

Review-Url: https://codereview.chromium.org/2322783002
9 years ago
tandrii 73449b0bd4 Gerrit git cl land: abort if not uploaded.
R=agable@chromium.org
BUG=642759,609225

Review-Url: https://codereview.chromium.org/2317253003
9 years ago
tandrii 5d0a0421ce git_cl: update outdated TODOs.
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2339903002
9 years ago
tandrii f46c20fcee codereview.settings: add GIT_NUMBER_FOOTER setting.
This will be used in repositories that use Cr-Commit-Position footers
to generate them at the time of git cl land instead of gnumbd.

R=iannucci@chromium.org
BUG=642493

Review-Url: https://codereview.chromium.org/2324583002
9 years ago
agable c6787971b5 Use 'draft' status to restrict access to private Gerrit reviews
R=andybons@chromium.org, tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2324283002
9 years ago
dsansome e2d6fd987e Prompt to delete pending edits before changing the Gerrit CL description.
BUG=641838

Review-Url: https://codereview.chromium.org/2318903002
9 years ago
dnj ba1b0f3795 git_cl: Enable updating description from local.
Currently, if one edits one's local CL description (e.g., `git commit
--amend`), there is no path for that update to get pushed to Rietveld.
This adds a "+" sentinel to the "-n" flag for `git cl description` that
tells it to load description content from the local commit.

The description should match what would be generated by "git cl upload".

BUG=None
TEST=local

Review-Url: https://codereview.chromium.org/2307463002
9 years ago
qyearsley 53f48a1c52 Add a --json option to git cl try-results.
For use in scripts that check try job results, this is
currently practically the same as making requests to
https://codereview.chromium.org/api/<cl-number>/<patchset-number>.

However, I think that this might be more future-proof, since
it fetches try job information from Buildbucket, and I expect
to still work after migration from Rietveld to Gerrit.

BUG=640354

Review-Url: https://codereview.chromium.org/2274743003
9 years ago
thomasanderson 074beb2e46 Add --stat option to git-cl diff
Review-Url: https://codereview.chromium.org/2285393002
9 years ago
tandrii c4344b5958 Fix Gerrit git cl land and add test.
R=andybons@chromium.org
BUG=641127

Review-Url: https://codereview.chromium.org/2280563003
9 years ago
agable f14eaff814 Remove --base_url from git cl and upload.py
R=tandrii@chromium.org
BUG=638750

Review-Url: https://codereview.chromium.org/2271873003
9 years ago
agable 92bec4f56f Delete gcl, drover, and trychange
These tools are relatively standalone, and only ever worked for SVN.
Removing these is a good start to removing other SVN support code.

R=maruel@chromium.org
BUG=475321

Review-Url: https://codereview.chromium.org/2269413002
9 years ago
qyearsley 12fa6ff69b Run auto-spell-checker (codespell) on files in depot_tools.
This should only change spelling in:
 - messages that are printed
 - comments
 - docstrings

Review-Url: https://codereview.chromium.org/2277513002
9 years ago
qyearsley eab3c04311 Change "tryjob" -> "try job" in git_cl.py and trychange.py.
I know this is an unimportant change, and that across Chromium,
"try job" and "tryjob", and "try bot" and "trybot" are basically
interchangeable, still I think it's nice to have the spelling
consistent within one module.

I prefer the version with a space just because that's what's used
in the documentation:
https://www.chromium.org/developers/testing/try-server-usage

Review-Url: https://codereview.chromium.org/2269283002
9 years ago
kmarshall 9249e01b70 git cl archive: Add "--dry-run" and "--notags" flags.
This CL adds a couple flags to "git cl archive".
dry-run: Lists the cleanup tasks, but exits before any changes are
made to Git.
notags: Deletes branches only; does not create archival tags.

R=tandrii@chromium.org,groby@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2276663002
9 years ago
tandrii 33a46ffb3f git cl: workaround against integer overflows of git config.
R=maruel@chromium.org,phajdan.jr@chromium.org
BUG=640115

Review-Url: https://codereview.chromium.org/2272613002
9 years ago
phajdan.jr e328cf9c78 git cl issue: add --json switch for machine-readable output
This was requested in https://chromium-review.googlesource.com/c/373499

BUG=none

Review-Url: https://codereview.chromium.org/2263103002
9 years ago
tandrii df09a46d7c git cl patch: bail out quickly if there is no branch.
This is because later calls to SetIssue() would fail.

R=michaelpg@chromium.org
BUG=611020

Review-Url: https://codereview.chromium.org/2259993002
9 years ago
tandrii 5d48c32f3d git cl: cleanup branch config get/set/unset.
Previously there was a soup with add-hoc formatting with
current branch name, which wasn't always set (see bug 611020).
This CL makes sure all such operations now:
 * properly use types --int and --bool
 * go through the *only* appropriate get/set/unset function.

Furthermore, tests were a mess wrt to raising exceptions when
git processes terminated with an exception. This CL cleaned up,
though I didn't go through all expectations, so some returns of
empty stdout instead of raising CalledProcess error are likely
remaining.

Disclaimer: this CL is not necessarily fixing the referenced bug
below, but it should at least provide better stacktrace when
the bug manifestst itself.

BUG=611020
R=agable@chromium.org

Review-Url: https://codereview.chromium.org/2259043002
9 years ago
tandrii 4d8955052f git cl: avoid infinite recursion during debug/development.
R=andybons@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2260453002
9 years ago
iannucci e53c935fe7 Add --issue to set-commit and set-close too.
R=phajdan.jr@chromium.org, tandrii@chromium.org, vadimsh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2245263007
9 years ago
tandrii 99a72f2514 Gerrit git cl upload: self-lgtm on TBR.
BUG=626364
R=andybons@chromium.org
TEST=manual: https://chromium-review.googlesource.com/#/c/372138

Review-Url: https://codereview.chromium.org/2259583002
9 years ago
iannucci 3c972b9039 Add --issue flag to git cl status.
R=phajdan.jr@chromium.org, vadimsh@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2250323003
9 years ago
tandrii ea9514aa20 Fix bug in git cl status and add logging.
BUG=629863
R=seanmccullough@chromium.org,andybons@chromium.org

Review-Url: https://codereview.chromium.org/2249303003
9 years ago
tandrii eefe83265b Gerrit git cl upload: auto-filter patchset titles.
Without it, upload fails because ref is invalid.

BUG=622062
R=andybons@chromium.org

Review-Url: https://codereview.chromium.org/2252043002
9 years ago
phajdan.jr 289d03e1c8 git-cl status: allow querying just the status of current CL
BUG=620494

Review-Url: https://codereview.chromium.org/2252473004
9 years ago
iannucci e7f68952a4 Change default codereview instance to one we maintain.
R=agable@chromium.org
BUG=637561

Review-Url: https://codereview.chromium.org/2250573002
9 years ago
phajdan.jr 7c3841abdf git cl set-commit: actually apply passed --rietveld / --gerrit options
BUG=600945

Recipe-Tryjob-Bypass-Reason: expectation changes expected and wanted
Review-Url: https://codereview.chromium.org/2234873002
9 years ago
phajdan.jr 6859823bf8 git cl set-commit: allow forcing code review system
Also default to latest patchset if no other one is specified locally.

BUG=600945

Review-Url: https://codereview.chromium.org/2230883002
9 years ago
dsinclair 99d3017946 Make sure thread pool has at least 1 worker.
When doing a 'git cl archive' if there are no branches other then master the
command will crash with a 'ValueError: Number of processes must be at least 1'
when attempting to create the thread pool.

This Cl modifies the code to use the maximum of the changes and 1 as the number
of threads to create so we have at least one thread to work with.

Review-Url: https://codereview.chromium.org/2228723003
9 years ago
brettw 4b8ed59b7b Update "git cl format" for GN changes.
"gn format" changed to remove the --in-place argument. This updates the
instructions for formatting and fixes existing usage.

git cl format --diff never worked, it just printed the full formatted output
unconditionally. This change improves things slightly by indicating there's a
diff for a file. A proper diff can be hooked up in a later stage if somebody
so desires.

Review-Url: https://codereview.chromium.org/2220123002
9 years ago
wychen 3c1c172d64 Extract patchset in Rietveld URLs better
Parse URL in the form of:
https://domain/<number>/#ps<patchset>

Review-Url: https://codereview.chromium.org/2215433004
9 years ago
nodir abb9b22752 remove luci hacks
the luci entry point is swarmbucket now

R=hinoka@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2196843002
9 years ago
tandrii 4d843595aa git cl set-commit: fix for Rietveld if cq dry run is active.
If dry-run was active, git cl set-commit didn't actually trigger a
full CQ run, but was just a no-op.

TBR=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2184643004
9 years ago
dtu 944b60530e Fix per-file owners check for deleted files.
Previously if you deleted a file that you had per-file owners on, it would fail
the owners check. This fixes that.

Originally, owners.Database used glob to enumerate the directory and added all
the matching files in the directory to some dicts holding the owners
information. If a CL deleted a file, it'd no longer be on the filesystem, so it
wouldn't be in these dicts. There'd be no per-file owners information for it.

With this patch, the Database no longer enumerates individual files. It instead
keeps track of the glob patterns and checks the CL's files against the patterns
at lookup time.

BUG=622381
TEST=tests/owners_unittest.py && tests/owners_finder_test.py  # Unit test included.

Review-Url: https://codereview.chromium.org/2148153002
9 years ago
tandrii 9de9ec66b3 git cl try: Trigger CQ Dry Run by default.
If bots are specified manually on command line OR in PRESUBMIT.py,
then old behavior remains, namely triggering just those bots.

Otherwise, git cl try will now trigger CQ Dry Run. This is a good
default and also resolves several bugs:

 * https://crbug.com/581150 where git cl try used to load cq.cfg
   from infra/config, but that's not always correct for all projects.

 * https://crbug.com/625697 where even if cq.cfg is in default location.
   it might be outdated.

 * https://crbug.com/585237 where git cl try would ignore special
   in CL description CQ_INCLUDE_TRYBOTS, which is processed by CQ,
   but not git cl try.

BUG=625697,585237,581150
R=sergiyb@chromium.org,emso@chromium.org

Review-Url: https://codereview.chromium.org/2147563003
9 years ago
tandrii d9e5ce518a Fix git cl set-commit --clear.
aka sergiyb@ was right.

R=sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2141283002
9 years ago
tandrii 6b410ec471 Gerrit CQ will not allow customization of CQ label values.
R=andybons@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2135313005
9 years ago
tandrii 2bdadf1e0d git cl upload: remove no longer aplicable message.
R=andybons@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2143693002
9 years ago
zengster bf47014c1a Added '.m' pattern to git cl format files to be covered.
BUG=

Review-Url: https://codereview.chromium.org/2123283005
9 years ago
tandrii 4d0545a439 Implement git cl upload --dry-run or --use-commit-queue for Gerrit.
Previously, it only worked for Rietveld.

BUG=622828
R=emso@chromium.org,machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2117183004
9 years ago
tandrii 4b233bdb48 Implement git cl set-commit --dry-run for Rietveld.
BUG=622828
R=emso@chromium.org,machenbach@chromium.org

Review-Url: https://codereview.chromium.org/2127633003
9 years ago
tandrii f9aefb774c Implement git cl upload -b BUG --bug=BUG.
CC=friedman@chromium.org
R=sergiyb@chromium.org
BUG=500658

Review-Url: https://codereview.chromium.org/2117483002
9 years ago
martiniss 6eda05f9e6 Allow git_cl to be called when no default server is given
Review-Url: https://codereview.chromium.org/2109253002
9 years ago
tandrii d0b10a0b31 Remove old compatibility for git_cl_upload branches.
R=machenbach@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2116493002
9 years ago
sergiyb 2546dcc080 Do not remove issue from branch after it is landed manually
This is consistent with the way CQ works. Also git-cl-archive won't work if
branch looses info about its matching CL.

R=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2111543002
9 years ago
nodir ca166003fb upload.py: honor explicit empty title
R=pauljensen@chromium.org
BUG=
TEST=PatchSet 3 of this CL

Review-Url: https://codereview.chromium.org/2096123003
9 years ago
tandrii b80458a73a git cl upload: add --message-file to provide arbitrary messages.
R=martiniss@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2087393004
9 years ago
tandrii d60367ba30 Gerrit git cl land: add warning if Commit-Queue label exists.
BUG=612727
R=agable@chromium.org

Review-Url: https://codereview.chromium.org/2089683002
9 years ago
tandrii 9d2c7a3d9a Rietveld git cl status: ignore CQ dry run and generated messages.
R=sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2083063002
9 years ago
tandrii e32e3eaebd Add warning for non-https remotes in Gerrit git cl upload.
R=shinyak@chromium.org,sergiyb@chromium.org
BUG=614312

Review-Url: https://codereview.chromium.org/2085013002
9 years ago
tandrii 7400cf0f84 Bump git-cl version to 2.0, since we now support Gerrit.
R=andybons@chromium.org
BUG=618017

Review-Url: https://codereview.chromium.org/2077773003
9 years ago
sergiyb 4a5ecbe615 Default to y(es) when asking user about archiving committed branches
R=tandrii@chromium.org

Review-Url: https://codereview.chromium.org/2074723002
9 years ago
tandrii a60502f2d3 Gerrit git cl upload: --squash is now default.
You can override it for all devs of repo by adding line to codereview.settings:
  GERRIT_SQUASH_UPLOADS: (True|False)

And even with that, individual devs can overide it for themselves with:
  git config [--global] --bool gerrit.override-squash-uploads (true|false)

BUG=611892

Review-Url: https://codereview.chromium.org/2072363002
9 years ago
tandrii 3bb82ff15a Add SVN->Git migration warning to git cl dcommit users.
R=mmoss@chromium.org,benhenry@chromium.org
BUG=600451,161849

Review-Url: https://codereview.chromium.org/2074883002
9 years ago
kylechar 58edce2b90 Enforce GN formatting for *.typemap files.
Ensure consistent formatting for Mojo typemap files that define the
build rules to generate StructTraits.

BUG=620799
TEST=Tested locally, both presubmit and git cl format work as expected.

Review-Url: https://codereview.chromium.org/2074793002
9 years ago
tandrii edbf9a3e85 Gerrit git cl upload: Remove --no-squash warning message.
First, it's wrong because of instruction in it is ineffective.
Second, it was also shown during --squash upload, which is completely wrong.

TBR=sergiyb@chromium.org
BUG=611892

Review-Url: https://codereview.chromium.org/2072923002
9 years ago
tandrii 8dd81ea20b Revert of Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config. (patchset #2 id:20001 of https://codereview.chromium.org/2070013002/ )
Reason for revert:
I suspect this broke squash setting setup.

Original issue's description:
> Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config.
>
> Previously, if GERRIT_SQUASH_UPLOADS was found in codereview.settings,
> a local repository value of gerrit.squash-uploads would be set.
>
> This CL changes that, so that gerrit.squash-uploads property is written
> with GERRIT_SQUASH_UPLOADS value ONLY IF the property wasn't set before.
>
> This allows individual users to choose their own way with
>   git config [--global] -bool gerrit.squash-uploads (true|false)
>
> BUG=611892
> R=andybons@chromium.org,sergiyb@chromium.org
>
> Committed: 768ec9a755

TBR=andybons@chromium.org,sergiyb@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=611892

Review-Url: https://codereview.chromium.org/2071963002
9 years ago
vapier a7fbd5a92a git_cl: convert to print_function
This makes the code work both in python2 and python3.

Review-Url: https://codereview.chromium.org/2066003002
9 years ago
vapier fd77ac7c77 git_cl: stop using deprecated except syntax
The newer form works with python2 and python3.

Review-Url: https://codereview.chromium.org/2061023003
9 years ago
tandrii 768ec9a755 Gerrit git cl: allow overriding GERRIT_SQUASH_UPLOADS in git config.
Previously, if GERRIT_SQUASH_UPLOADS was found in codereview.settings,
a local repository value of gerrit.squash-uploads would be set.

This CL changes that, so that gerrit.squash-uploads property is written
with GERRIT_SQUASH_UPLOADS value ONLY IF the property wasn't set before.

This allows individual users to choose their own way with
  git config [--global] -bool gerrit.squash-uploads (true|false)

BUG=611892
R=andybons@chromium.org,sergiyb@chromium.org

Review-Url: https://codereview.chromium.org/2070013002
9 years ago
tandrii 26f3e4eecb Update message for Gerrit git cl --no-squash users.
R=andybons@chromium.org
BUG=611892

Review-Url: https://codereview.chromium.org/2055233002
9 years ago
tandrii 16e0b4e206 Gerrit git cl upload: warn and offer to remove Gerrit commit-msg hook.
R=andybons@chromium.org,sergiyb@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2045973002
9 years ago
tandrii b93dd2b2f4 git cl try: clarify where the default set of bots is coming from.
R=sergiyb@chromium.org,dsinclair@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2044663003
9 years ago
kmarshall 3bff56bb49 Add "archive" command to git_cl.py.
This command archives branches whose Rietveldt status is closed by
creating new Git tags for each of the branches' heads, and then
deleting the branch. It automatically cleans up the clutter that
accumulates over time in a long-lived Git checkout.

For example, the branch "foo-bar" associated with the
closed issue 1568403002 will be archived to the tag
"git-cl-archived-1568403002-foo-bar".

BUG=616404
R=martiniss@chromium.org,tandrii@chromium.org

Review-Url: https://codereview.chromium.org/1991563005
9 years ago
tandrii@chromium.org 074c2afe94 Revert of Gerrit git cl: temporary disable cc option on upload. (patchset #1 id:1 of https://codereview.chromium.org/1895863002/ )
Reason for revert:
We've whitelisted cc-ed emails in Gerrit, and so let's try setting cc= again.

Original issue's description:
> Gerrit git cl: temporary disable cc option on upload.
> 
> Gerrit doesn't allow arbitrary non-member emails for now,
> thus removign this feature until either Gerrit allows it,
> or we have a per-repo opt-in way.
> 
> TBR=andybons@chromium.org
> BUG=604377
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=299988

TBR=andybons@chromium.org,sergiyb@chromium.org
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=604377

Review-Url: https://codereview.chromium.org/2034143002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300694 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 601e1d17ef git cl description: avoid appending BUG= after Change-Id.
R=yyanagisawa@chromium.org,sergiyb@chromium.org
BUG=614587

Review-Url: https://codereview.chromium.org/2038673002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300692 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9b7fd71c48 git cl issue 0 should really clear issue.
It used to clear just issue number and patchset, but that's not
all state that associates a given branch with codereview site.

R=andybons@chromium.org
BUG=609295

Review-Url: https://codereview.chromium.org/2032433003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300683 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c2786d933b Fix & refactor git cl patch.
* Fixes a bug when issue was incorrectly over-written
  in another branch. Add a test case.
* Refactor for better flow.
* Update outdated errors on wrong arguments.

BUG=616105
R=andybons@chromium.org,sergiyb@chromium.org

Review-Url: https://codereview.chromium.org/2022183003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300681 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b067ec5372 git cl upload: die when --no-squash has no commit-msg-hook.
Otherwise, the program continues, and an exception is printed.
The message is still there, but easy to miss.

R=andybons@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2004303003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300674 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
clemensh@chromium.org cbd7dc3ce5 Use CLs more consistently instead of branch names
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300132

Review-Url: https://codereview.chromium.org/1893563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300673 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8da4540381 Gerrit git cl upload: obey -s --send-mail option.
Previously, git cl upload would send email every time.
This CL changes that to send email only if -s or --send-mail is given.

R=andybons@chromium.org
BUG=612728

Review-Url: https://codereview.chromium.org/2007873002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300662 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 5e1bf38efa Fix git cl status for MERGED CLs.
TBR=sergiyb@chromium.org
BUG=612414

Review-Url: https://codereview.chromium.org/1980323002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300621 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
calamity@chromium.org cf1974811b Fix hanging issue with git map-branches.
This CL fixes an issue where map branches would hang when trying to
retrieve a deleted issue due to a long timeout. This has been fixed by
reducing the timeout.

This CL also fixes a small issue where {NO_UPSTREAM} would show the
current branch's codereview URL.

BUG=470765

Review-Url: https://codereview.chromium.org/1847693004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300369 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org d6648e2d3a git_cl: Add the ability to set the description. (reland)
BUG=607359

Review-Url: https://codereview.chromium.org/1935653002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300366 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 611cd7ab02 Revert of git_cl: Add the ability to set the description. (patchset #3 id:40001 of https://codereview.chromium.org/1922133006/ )
Reason for revert:
splitlines man

Original issue's description:
> git_cl: Add the ability to set the description.
> 
> BUG=607359
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300357

TBR=iannucci@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=607359

Review-Url: https://codereview.chromium.org/1935633002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300360 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org b73176a772 git_cl: Add the ability to set the description.
BUG=607359

Review-Url: https://codereview.chromium.org/1922133006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300357 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 37b07a78ee Reland Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300353 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 83b1b238c6 Revert of Implement owners check in presubmit for Gerrit. (patchset #5 id:80001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
now it doesn't work for gerrit. Damn it.

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300350

TBR=machenbach@chromium.org,phajdan.jr@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1935563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300352 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org b4cd1960d5 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300350 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org 2403e80b59 Reland of git cl try: don't skip presubmit builders, but set dry_run property. (patchset #1 id:1 of https://codereview.chromium.org/1928373002/ )
Reason for revert:
Was me - too fast to pull the revert trigger. The CL in question has notry set to true :(

Original issue's description:
> Revert of git cl try: don't skip presubmit builders, but set dry_run property. (patchset #2 id:20001 of https://codereview.chromium.org/1926663002/ )
> 
> Reason for revert:
> Now only presubmit is scheduled on dry run, example CL:
> https://codereview.chromium.org/1804003002
> 
> Original issue's description:
> > Reland of git cl try: don't skip presubmit builders, but set dry_run property.
> > 
> > With a fix: actually set dry_run for presubmit, and don't set it for other builders.
> > 
> > R=machenbach@chromium.org,sergiyb@chromium.org
> > BUG=601128,594127,591030
> > 
> > Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300295
> 
> TBR=sergiyb@chromium.org,tandrii@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=601128,594127,591030
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300337

TBR=sergiyb@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=601128,594127,591030

Review-Url: https://codereview.chromium.org/1930363003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300338 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org c2dfcb8ddb Revert of git cl try: don't skip presubmit builders, but set dry_run property. (patchset #2 id:20001 of https://codereview.chromium.org/1926663002/ )
Reason for revert:
Now only presubmit is scheduled on dry run, example CL:
https://codereview.chromium.org/1804003002

Original issue's description:
> Reland of git cl try: don't skip presubmit builders, but set dry_run property.
> 
> With a fix: actually set dry_run for presubmit, and don't set it for other builders.
> 
> R=machenbach@chromium.org,sergiyb@chromium.org
> BUG=601128,594127,591030
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300295

TBR=sergiyb@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=601128,594127,591030

Review-Url: https://codereview.chromium.org/1928373002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300337 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
machenbach@chromium.org 6996a10666 Revert of Implement owners check in presubmit for Gerrit. (patchset #3 id:40001 of https://codereview.chromium.org/1927773002/ )
Reason for revert:
Breaks presubmit:
https://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/175120/steps/presubmit/logs/stdio

Original issue's description:
> Implement owners check in presubmit for Gerrit.
> 
> R=machenbach@chromium.org,phajdan.jr@chromium.org
> BUG=605563
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300320

TBR=phajdan.jr@chromium.org,tandrii@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=605563

Review-Url: https://codereview.chromium.org/1928343002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300326 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org f48a375153 Implement owners check in presubmit for Gerrit.
R=machenbach@chromium.org,phajdan.jr@chromium.org
BUG=605563

Review-Url: https://codereview.chromium.org/1927773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300320 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
bsep@chromium.org 627d9002a6 Subprocess uses shell=True on Windows when launching GN.
BUG=600051

Review-Url: https://codereview.chromium.org/1917863009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300311 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c68f7b51f5 Reland of git cl try: don't skip presubmit builders, but set dry_run property.
With a fix: actually set dry_run for presubmit, and don't set it for other builders.

R=machenbach@chromium.org,sergiyb@chromium.org
BUG=601128,594127,591030

Review-Url: https://codereview.chromium.org/1926663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300295 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 3ea2614b3e Revert of git cl try: don't skip presubmit builders, but set dry_run property. (patchset #1 id:1 of https://codereview.chromium.org/1926663002/ )
Reason for revert:
Schedules fine, but property not set: https://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/14295/

reverting first, then investigating.

Original issue's description:
> git cl try: don't skip presubmit builders, but set dry_run property.
> 
> R=machenbach@chromium.org,sergiyb@chromium.org
> BUG=601128,594127,591030
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300265

TBR=machenbach@chromium.org,sergiyb@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=601128,594127,591030

Review-Url: https://codereview.chromium.org/1929483004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300274 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c39431ae2c git cl try: don't skip presubmit builders, but set dry_run property.
R=machenbach@chromium.org,sergiyb@chromium.org
BUG=601128,594127,591030

Review-Url: https://codereview.chromium.org/1926663002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300265 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8c3b442a99 Pedantic follow up nitfix.
Follow up on https://codereview.chromium.org/1901733003.

R=martiniss@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1924643002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300236 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
martiniss@chromium.org 2b55fe30e6 git_cl: description fetching from code review servers.
BUG=

Review URL: https://codereview.chromium.org/1901733003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300207 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
scottmg@chromium.org 6d1266eef6 Make `git cl description` work for Gerrit
Example change at https://chromium-review.googlesource.com/c/340430/.

R=tandrii@chromium.org
BUG=603207

Review URL: https://codereview.chromium.org/1917473002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300188 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 600b49250f Add missing method stub for _GerritCodereviewImpl.
This should make presubmit happy for oncoming git cl desc for Gerrit:
https://codereview.chromium.org/1917473002/

BUG=603207
TBR=hinoka@chromium.org,scottmg@chromium.org

Review URL: https://codereview.chromium.org/1917933003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300186 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
hinoka@chromium.org 56d0de79a7 Revert of Make `git cl description` work for Gerrit (patchset #2 id:20001 of https://codereview.chromium.org/1917473002/ )
Reason for revert:
Broke presubmit

Original issue's description:
> Make `git cl description` work for Gerrit
> 
> This works in that it actually changes the description, but after
> multiple changes, there's multiple footers added. I'm not sure if they
> should be stripped in setting the description? Or is the problem in
> FetchDescription() where it shouldn't be returning
> 'commit_with_footers', but rather something else?
> 
> Example change at https://chromium-review.googlesource.com/c/340430/.
> 
> R=tandrii@chromium.org
> BUG=603207
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=300169

TBR=tandrii@chromium.org,scottmg@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=603207

Review URL: https://codereview.chromium.org/1922733002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300175 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
scottmg@chromium.org 4d038b4334 Make `git cl description` work for Gerrit
This works in that it actually changes the description, but after
multiple changes, there's multiple footers added. I'm not sure if they
should be stripped in setting the description? Or is the problem in
FetchDescription() where it shouldn't be returning
'commit_with_footers', but rather something else?

Example change at https://chromium-review.googlesource.com/c/340430/.

R=tandrii@chromium.org
BUG=603207

Review URL: https://codereview.chromium.org/1917473002 .

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300169 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 04ea846ba0 Revert of Use CLs more consistently instead of branch names (patchset #3 id:40001 of https://codereview.chromium.org/1893563002/ )
Reason for revert:
speculative revert.

Original issue's description:
> Use CLs more consistently instead of branch names
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=300132

TBR=clemensh@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/1913923002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300167 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 2d3da63e29 Fetch Gerrit cl description from gitiles.
R=andybons@chromium.org,scottmg@chromium.org
BUG=603207,605563

Review URL: https://codereview.chromium.org/1916123002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300161 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
clemensh@chromium.org 81156e6cc3 Use CLs more consistently instead of branch names
Review URL: https://codereview.chromium.org/1893563002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300132 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 0b2d70724f Gerrit git cl: temporary disable cc option on upload.
Gerrit doesn't allow arbitrary non-member emails for now,
thus removign this feature until either Gerrit allows it,
or we have a per-repo opt-in way.

TBR=andybons@chromium.org
BUG=604377

Review URL: https://codereview.chromium.org/1895863002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299988 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
shinyak@chromium.org 00dbccdcef Use hyphen for gerrit.skip-ensure-authenticated
git config key should consist of alphanumeric characters and '-'.
The underscore '_' is not allowed. So we're getting 'invalid key' error
when GERRIT_SKIP_ENSURE_AUTHENTICATED is set.

Let's use '-' instead of '_'.

BUG=603378

Review URL: https://codereview.chromium.org/1882833005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299952 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 2825353c97 Allow to skip EnsureAuthenticated for Gerrit.
Adding this line to codereview.settings should do the trick:
  GERRIT_SKIP_ENSURE_AUTHENTICATED: true

And I also cleaned up tests so they don't spill too much to stdout.

BUG=603378
R=machenbach@chromium.org,andybons@chromium.org
CC=shinyak@chromium.org

Review URL: https://codereview.chromium.org/1884173003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299926 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org dde6462520 git cl: add --gerrit and --rietveld options to force codereview.
This makes it possible to override the codereview set in:
 * repository codereview.settings
 * cached/set in local .git/config, either repo-wide or
   current branch only.

Examples:

    cd $SOME_RIETVELD_USING_REPO
    # Enable Gerrit codereview on it. Contact Infra-Git admin:
    # https://bugs.chromium.org/p/chromium/issues/entry?template=Infra-Git

    # Uploading
    git cl upload --gerrit --squash
    # Hack, hack, re-upload uses Gerrit automatically.
    git cl upload --squash

    # Patching
    git new-branch patched-in-issue
    git cl patch --gerrit XXXXXX

    # (Re-)setting issue
    git cl issue --gerrit 0
    git cl issue --gerrit XXXXXX

R=andybons@chromium.org,sergiyb@chromium.org
BUG=598681

Review URL: https://codereview.chromium.org/1880243003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299901 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org fa330e8012 git cl set-commit: for Gerrit + dry-run support.
This provides workaround for not functioning git cl try.

R=sergiyb@chromium.org,andybons@chromium.org,phajdan.jr@chromium.org
BUG=599931

Review URL: https://codereview.chromium.org/1889483002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299900 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8930b3d693 git cl: update Gerrit todos and small nits.
R=andybons@chromium.org
BUG=579160

Review URL: https://codereview.chromium.org/1879393002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299894 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 8acd833e45 Gerrit git cl upload: implement setting cc and reviewers.
R=machenbach@chromium.org,andybons@chromium.org
BUG=323819

Review URL: https://codereview.chromium.org/1885883002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299887 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org bf766ba3d3 Gerrit git cl upload: implement patchset title (message).
R=machenbach@chromium.org,andybons@chromium.org
BUG=579178

Review URL: https://codereview.chromium.org/1886433003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299886 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 11a899e057 Fix regression in git cl for Gerrit.
TBR=andybons@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1884673004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299885 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org fe30f18fc5 Gerrit git cl upload: add check for missing credentials.
Checks creds before uploading and running presubmit, generalizing
the case of Rietveld. If they are missing, suggests a URL to
generate them.

R=andybons@chromium.org,phajdan.jr@chromium.org
BUG=583153

Review URL: https://codereview.chromium.org/1882583003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299883 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
techtonik@gmail.com 5573df146f Check for clang-format only if its files are present
R=agable@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1880013002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299867 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org d03bc634dc Small refactor git cl py.
R=sergiyb@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1876923002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299857 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 9e6c3a5559 Refactor CMDUpload further to avoid checks IsGerrit().
R=sergiyb@chromium.org,andybons@chromium.org,machenbach@chromium.org
BUG=579160,597638

Review URL: https://codereview.chromium.org/1875163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299855 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org aa6235b1f6 Refactor git cl RietveldUpload and GerritUpload.
No functionality changes.

R=machenbach@chromium.org,andybons@chromium.org
BUG=579160,597638

Review URL: https://codereview.chromium.org/1877893002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299844 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 26c8fd2b1a Fix git cl checkout when no branch has issues.
TBR=machenbach@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1878613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299843 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 5df290f6af git cl checkout: implement for Gerrit + add test.
R=sergiyb@chromium.org,andybons@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1873233002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299833 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org abd27e5bbd git cl checkout: reall fix it.
TBR=machenbach@chromium.org,andybons@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1874253003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299829 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org de6c9a1d23 Fix git cl checkout.
TBR=machenbach@chromium.org,andybons@chromium.org
BUG=579182

Review URL: https://codereview.chromium.org/1877853002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299827 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 534f67a148 Slight refactor git cl diff.
R=machenbach@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1867073002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299769 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago