Commit Graph

787 Commits (9f273d01c0d566df0b80283047cf9950c207835d)

Author SHA1 Message Date
Quinten Yearsley 0e617c0294 Change git cl comments to list robot comments.
In particular, only show robot comments from the latest patchset.

Bug: 924780
Change-Id: I12038ddd2d90a5cb561b248de3fd37908d5b927e
Reviewed-on: https://chromium-review.googlesource.com/c/1457282
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
6 years ago
Takuto Ikuta 51eca59ff6 Support --enable-auto-submit in `git cl split`
With default True.

This CL was uploaded by git cl split.

R=jochen@chromium.org
Bug: 927178
Change-Id: Ie0a68ed7ca381e1bb33341badca153bf409bb376
Reviewed-on: https://chromium-review.googlesource.com/c/1470402
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Auto-Submit: Takuto Ikuta <tikuta@chromium.org>
6 years ago
Daniel McArdle 452a49f4b6 Fix colorized branch alignment in 'git cl status'
Change-Id: Ie32057ecabc3839273c74c08bef95515b7522ea4
Reviewed-on: https://chromium-review.googlesource.com/c/1468381
Commit-Queue: Daniel McArdle <dmcardle@chromium.org>
Auto-Submit: Daniel McArdle <dmcardle@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Raul Tambre 5a52587030 Support Git editor paths with spaces
Git requires single quotes for paths with spaces.
We however need to convert single quotes to double quotes for Windows to treat such paths as a single path.

Bug: 916922
Change-Id: I89b23552a2a32d5aa58ea4f207690595823692d5
Reviewed-on: https://chromium-review.googlesource.com/c/1467301
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Raul Tambre <raul@tambre.ee>
6 years ago
Sylvain Defresne b1f865dac5 Add a --ignore-self parameter to "git cl owners"
Sometimes CL author is also listed as OWNERS but want to find a co-owner
to review CL. Currently "git cl owners" is unhelpful as it consider the
author's ownership as enough.

Add a --ignore-self parameter to "git cl owners" that will cause the
tool to ignore author's ownership when looking for a reviewer.

Bug: none
Change-Id: Iba110a465a552cd6befb46c77b2e65f60b663a13
Reviewed-on: https://chromium-review.googlesource.com/c/1459625
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
6 years ago
Daniel McArdle a23bf5951d Colorize the current branch in 'git cl status'
Change-Id: I5cdb484ae4b6829aeeb83924fb464939cdb4298b
Reviewed-on: https://chromium-review.googlesource.com/c/1464776
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Daniel McArdle <dmcardle@chromium.org>
6 years ago
Bryce Thomas cfc9712bc8 Fix git cl format following removal of Rietveld.
Commit a185e2e3c8 removed the Rietveld code review
implementation, albeit hasn't expunged all references to Rietveld.  This leads
to an assertion error when running |git cl format| on a non-Gerrit change.
There appears to have been a recent attempt to articulate this error better in
a185e2e3c8, albeit not fix the underlying issue.
This change addresses the immediate issue by defaulting the code review
implementation to Gerrit rather than Reitveld.

R=joenotcharles@google.com, tandrii@chromium.org

Bug: 914150
Change-Id: I64d33e5a172cc43339ec417f7f0a7820e0337772
Reviewed-on: https://chromium-review.googlesource.com/c/1372928
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Bryce Thomas <bryct@amazon.com>
6 years ago
Edward Lemur 687ca907fd git-cl: Set Code-Review label as a git push argument.
Bug: 877717
Change-Id: I6541a971068aae662b086eba84448bd0769f1a09
Reviewed-on: https://chromium-review.googlesource.com/c/1362405
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
6 years ago
Joe Mason d87b09662e More context when _load_codereview_impl asserts
Bug: 908466
Change-Id: I715633c64fff343d07dbcf50c261e686d77e8c44
Reviewed-on: https://chromium-review.googlesource.com/c/1351511
Reviewed-by: Andy Perelson <ajp@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Joe Mason <joenotcharles@google.com>
6 years ago
Edward Lemur 61ea30737c git-cl: Remove unused settings.
Bug: 770408
Change-Id: Ic5029d6b12cdb6ea30704d90229ab7e365dc7273
Reviewed-on: https://chromium-review.googlesource.com/c/1354384
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
6 years ago
Aiden Benner 6c18a1afa1 Fix git cl format --python when diff.noprefix flag is set
Adding the diff.noprefix flag to .gitconfig broke python
formatting because git diffs were being parsed with regex
that relied on the default git diff prefixs.

This CL fix's this issue by always specifying prefix flags
for git diffs when formatting python.

Bug:846432
Change-Id: Ifde305da9574e6b46455a0237703b7364fac77e4
Reviewed-on: https://chromium-review.googlesource.com/c/1349809
Reviewed-by: Marc-Antoine Ruel <maruel@chromium.org>
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
7 years ago
Andrii Shyshkalov a185e2e3c8 git cl: remove Rietveld implementation entirely.
R=ajp, ehmaldonado

Change-Id: I59859048d64902669479e666c6c3d37c1fb1394c
Reviewed-on: https://chromium-review.googlesource.com/c/1344642
Auto-Submit: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 0a264d861b git cl: remove Rietveld import and things it depends on.
On my machine, saves 0.16s of time while loading git cl:
from 0.32s to 0.16s.

R=ajp, ehmaldonado

Change-Id: I0febca43f11514da3e3f7be7e2c0184fb9e17409
Reviewed-on: https://chromium-review.googlesource.com/c/1344641
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov dd5e09a1c3 git cl: get rid of Rietveld's upload.py import.
R=ajp, ehmaldonado

Change-Id: I9c9f5e0f8ef41c0f6a00faa67acf0cf516290f09
Reviewed-on: https://chromium-review.googlesource.com/c/1345272
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Aiden Benner 99b0ccb45a Enable python formatting by default if yapf file provided
Enables python formatting in git cl format by default
for all files that have a .style.yapf file in a parent
directory up to the repository root. If no .style.yapf
file is found the --python flag still needs to be
set explicitly for python formatting to be enabled.
Also adds a --no-python to explicitly disable python
formatting on any file even if a .style.yapf file is found.

This allows default formatting to be enabled on a per
project/directory basis by adding a .style.yapf file.

Bug:846432
Change-Id: I40d899ec1a3e0dfca445e04b91befab113416175
Reviewed-on: https://chromium-review.googlesource.com/c/1316415
Commit-Queue: Aiden Benner <abenner@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
7 years ago
Aiden Benner e47ac15d93 Fix git cl format --python on windows
git cl format --python currently breaks on windows
because FindExecutable('yapf') returns .../depot_tools/yapf
(a py file) instead of .../depot_tools/yapf.bat. Also
yapf.bat tries to run the yapf py file without vpython
which breaks the yapf dependency.

This CL fixes these two issues.


Bug:846432
Change-Id: I551a4c1e6367074fa76767851bd34feb2dcfb6a2
Reviewed-on: https://chromium-review.googlesource.com/c/1341236
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aiden Benner <abenner@google.com>
7 years ago
Mohamed Heikal 171c07458e Fix crash were CL has no reviewers
Currently git cl owners tries to fetch the current reviewers of a CL
from gerrit. However, this fails with a KeyError when there are no
reviewers currently. This cl fixes that bug.

Bug: 895722
Change-Id: I78a998ee234d207523aa2cef4b5058ba7cfecbc2
Reviewed-on: https://chromium-review.googlesource.com/c/1330122
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Edward Lemur edcefdcf7d git-cl: Print git push stdout.
Tbr: tandrii@chromium.org
Bug: 881860
Change-Id: I17dd5c3b6e3fc6da126487b03ea4fc5aa06c2898
Reviewed-on: https://chromium-review.googlesource.com/c/1326561
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Dan Beam cf6df902d6 git cl status: Force description encoding to utf-8 to avoid throwing
Example error: https://gist.github.com/danbeam/3c6b1f98b5d4a921a583a6f070ed0bf0

R=dpranke@chromium.org
BUG=none

Change-Id: Ib3406ce04782b08b1761506b494b96a827fa4a84
Reviewed-on: https://chromium-review.googlesource.com/c/1299615
Commit-Queue: Dan Beam <dbeam@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
7 years ago
Edward Lemur 49c8eafcd5 git-cl: Stop logging response headers on 404 Gerrit RPC status.
Bug: 881860
Change-Id: I96a1e8f3ed9fe032307b49d7a130d512e050369e
Reviewed-on: https://chromium-review.googlesource.com/c/1306013
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Edward Lemur 01f4a4ff1c git-cl: Add tests for metrics collection.
Bug: 897394
Change-Id: I07959e870fef4e6a6b8e6e7c974397d3306460c1
Reviewed-on: https://chromium-review.googlesource.com/c/1315839
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur fec80c4135 git-cl: Report git push information to metrics collection.
Bug: 897394
Change-Id: I52a31bb4840b5de89b96545a3e7544c6708f148f
Reviewed-on: https://chromium-review.googlesource.com/c/1312240
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov e7a7fc42b6 git cl upload: set CQ and Auto Submit labels through refspec.
Except when TBR is active, because it's not clear how to
compute max score for Code-Review label before uploading a change.

Tested with this very own CL:
  To https://chromium.googlesource.com/chromium/tools/depot_tools.git
   * [new branch]        c78de165c7 ->
     refs/for/refs/heads/master%ready,notify=ALL,m=Initial_upload,r=ehmaldonado,
         cc=ajp,cc=chromium-reviews@chromium.org,cc=iannucci+depot_tools@chromium.org,
         l=Commit-Queue+1,hashtag=git-cl-upload
R=ehmaldonado

Bug: 877717
Change-Id: I464d9df2814bd830dd608bb881040e2dd3c41dbb
Reviewed-on: https://chromium-review.googlesource.com/c/1307052
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 0da5e8f8a6 git cl upload: cc + reviewers in git push for chromium host.
For other hosts, behavior is not changed.

Tested on this very CL:
  To https://chromium.googlesource.com/chromium/tools/depot_tools.git
    * [new branch]        9057c2235b ->
      refs/for/refs/heads/master%ready,notify=ALL,m=Initial_upload,r=ehmaldonado,cc=chromium-reviews@chromium.org,cc=iannucci+depot_tools@chromium.org,hashtag=git-cl-upload

R=ehmaldonado

Bug: 877717
Change-Id: I951fc576105211590c6c303ce0ed2fe142628224
Reviewed-on: https://chromium-review.googlesource.com/c/1307051
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov f170af48e4 git cl: more accurate logging message and level.
R=ehmaldonado

Change-Id: I321de4b0f33dd17473b012bcaddbb925aab7929f
Bug: 877717
Reviewed-on: https://chromium-review.googlesource.com/c/1296855
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 46f20cd390 git cl: ensure logging is properly initialized.
R=ehmaldonado

Bug: 877717
Change-Id: If8cce9453ca72b3b300902f5a03e7a8aa93d17b5
Reviewed-on: https://chromium-review.googlesource.com/c/1296856
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Sergiy Byelozyorov cb629a482b Add an option to publish CL when posting comments
R=tandrii@chromium.org

Change-Id: Icc4a4432ee51f24bd46001180a009b5b6bff8998
Reviewed-on: https://chromium-review.googlesource.com/c/1296521
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
7 years ago
Sergiy Byelozyorov 2b71832f6d Hide standard output from the browser when running git-cl-web
R=nodir@chromium.org

Change-Id: I0816a109bc50cbc5c06339b832748f03abee372a
Reviewed-on: https://chromium-review.googlesource.com/c/1296511
Commit-Queue: Sergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
7 years ago
Edward Lesmes 93277a7fc8 git-cl: Don't report metrics for not-known repos.
It is not recorded by the server, but causes a 500 status anyway.

Bug: 896868
Change-Id: Ic3bf0d989bf3c3641dae9ea49a58ffb28f52e865
Reviewed-on: https://chromium-review.googlesource.com/c/1289769
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 3e002fb862 git cl land: remove Rietveld-only options.
R=ehmaldonado

Bug: 770408
Change-Id: I6f460902e3282451f5761bebf176d180a8f88d26
Reviewed-on: https://chromium-review.googlesource.com/c/1279141
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 51bdf8c8dd Reland "git cl: delete no longer used Rietveld methods."
This is a reland of 38d36a616d
but now
 $ git cl status
 $ git cl archive
actually work.

Original change's description:
> git cl: delete no longer used Rietveld methods.
>
> R=ehmaldonado
>
> Bug: 770408
> Change-Id: I4dc034839180a7587ee368793547c5b74c2572f6
> Reviewed-on: https://chromium-review.googlesource.com/c/1279139
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>

Bug: 770408, 895784
Change-Id: Id1dbf31dc19d693f1c4636c9558e1ac99fe6a77b
Reviewed-on: https://chromium-review.googlesource.com/c/1287245
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 1e488131ff Revert "git cl: delete no longer used Rietveld methods."
This reverts commit 38d36a616d.

Reason for revert: breaks git cl archive for old rietveld branches.

Original change's description:
> git cl: delete no longer used Rietveld methods.
> 
> R=​ehmaldonado
> 
> Bug: 770408
> Change-Id: I4dc034839180a7587ee368793547c5b74c2572f6
> Reviewed-on: https://chromium-review.googlesource.com/c/1279139
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>

TBR=tandrii@chromium.org,ehmaldonado@chromium.org

Change-Id: Ifff7b5e13b104841ecf2c190b043ad23f9dbcccd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 770408
Reviewed-on: https://chromium-review.googlesource.com/c/1284990
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov c68a1753c5 git cl try-results: delete Rietveld support.
R=ehmaldonado

Bug: 770408
Change-Id: I94ff37f198937dc7d341a859a71becd91cf3a706
Reviewed-on: https://chromium-review.googlesource.com/c/1279140
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 38d36a616d git cl: delete no longer used Rietveld methods.
R=ehmaldonado

Bug: 770408
Change-Id: I4dc034839180a7587ee368793547c5b74c2572f6
Reviewed-on: https://chromium-review.googlesource.com/c/1279139
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov b07575f6ab git cl: rename and relocate CreateDescriptionFromLog func.
R=ehmaldonado

Change-Id: I89535733b7b19370b95ce1b94f4cc69265e9b293
Reviewed-on: https://chromium-review.googlesource.com/c/1279137
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov dd672fb3c5 git cl description: rename gerrit test.
R=ehmaldonado

Bug: 770408
Change-Id: I211ad8e67e9486b974eed7694436afb15ecf21a2
Reviewed-on: https://chromium-review.googlesource.com/c/1279136
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 642641d030 git cl comments: remove Rietveld support.
R=ehmaldonado

Bug: 770408
Change-Id: Ib3120b5fd09c35be691c025d0d69ceda60f2ec7f
Reviewed-on: https://chromium-review.googlesource.com/c/1279135
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov feec80e971 git cl: no longer support --rietveld flag when forcing codereview.
R=ehmaldonado

Bug: 770408
Change-Id: I980487aacd115535d0ca855cd1edfcfc18fc5cbe
Reviewed-on: https://chromium-review.googlesource.com/c/1279138
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 7d7bbc3b53 git cl upload: delete no longer supported flags.
--email
--emulate-svn-auto-props

R=ehmaldonado

Bug: 770408
Change-Id: I645342e5735313055c713bc8f8b68eee353aba49
Reviewed-on: https://chromium-review.googlesource.com/c/1279134
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 2f727917ac git cl: add reviewers and ccs to git push command if possible.
Also fix a typo in ValidateEmail function which didn't support
email addresses with '-' in them, e.g., infra-dev@chromium.org.

R=ehmaldonado

Bug: 875089
Change-Id: I2d73c1473527c9bf62e25e9f88250196b783fcb0
Reviewed-on: https://chromium-review.googlesource.com/c/1242849
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 9f274436bd git cl: partially remove Rietveld support for uploading code.
Also deletes lots of tests which provided coverage for Rietveld only,
and hence no longer useful.

R=ehmaldonado

Bug: 770408
Change-Id: I31195f7819a52d1063ed28064a74fd70fbc39357
Reviewed-on: https://chromium-review.googlesource.com/c/1279133
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov 03da150665 git cl: delete Rietveld support for tryjobs.
R=ehmaldonado

Bug: 770408
Change-Id: Id070e6084b6beba7309bdc35f0f750decd77e0c9
Reviewed-on: https://chromium-review.googlesource.com/c/1279132
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov f5569d2608 git cl: start deleting Rietveld support.
R=ehmaldonado

Bug: 770408
Change-Id: I5020596ada0c6fef2797fed6b78e7256a35ffc40
Reviewed-on: https://chromium-review.googlesource.com/c/1279131
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov ba7b0a466d git cl: find which reviewers and ccs are OK for Gerrit before upload.
This adds O(reviewers+cc) RPC to Gerrit before upload,
though done concurrently in up to 10 threads. This information isn't
used yet, but will be in follow up CLs.

R=ehmaldonado

Bug: 877717
Change-Id: I2374f249ee874a71089244309e50e8e88a3dee7d
Reviewed-on: https://chromium-review.googlesource.com/c/1242847
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Andrii Shyshkalov 76988a8c52 git cl: compute reviewers and ccs before pushing change to Gerrit.
R=ehmaldonado

Bug: 877717
Change-Id: Iccfba594369d8c726fd9b077d3ac18046757e4a2
Reviewed-on: https://chromium-review.googlesource.com/c/1242845
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
7 years ago
Andrii Shyshkalov dd78844442 git cl: bring label setting closer to git push in Gerrit case.
R=ehmaldonado

Bug: 877717
Change-Id: I81e574068687576cc44e41ba00ba650de8aae31b
Reviewed-on: https://chromium-review.googlesource.com/c/1242844
Reviewed-by: Edward Lesmes <ehmaldonado@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur 47faa068e8 git-cl: Make request to upload logs more visible.
Print the message asking the user to upload gerrit logs for git-cl upload
failures after the exception.

Also, initialize the error logger only for git-cl upload, so that the
headers are not overwritten unless git-cl upload is executed again.

Bug: 881860
Change-Id: I8e63432eecca5253e56096e3ad0218eec4058e12
Reviewed-on: https://chromium-review.googlesource.com/c/1277426
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Edward Lemur 83bd7f4cd5 git-cl: Print response headers on 404 Gerrit RPC status.
And ask the user to report the printed headers to the bug.

Bug: 881860
Change-Id: I0a6cc0d90b4a721f72cd7eee4cba59934facbb1e
Reviewed-on: https://chromium-review.googlesource.com/c/1266837
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Vadim Shtayura b250ec16d3 [git_cl] Don't check .gitcookies when running on LUCI.
This CL basically replaces "skip if is_gce" with "skip if default auth method
is not gitcookies".

This presumable makes 'git cl' work on LUCI in a consistent manner. Before, it
worked only if the LUCI bot happened to also be GCE bot.

R=tandrii@chromium.org
BUG=891755

Change-Id: I2caa219a4082438a5e026e728bfb62f46a0c80fd
Reviewed-on: https://chromium-review.googlesource.com/c/1260053
Commit-Queue: Vadim Shtayura <vadimsh@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
7 years ago
Aiden Benner c08566e6e2 Add non --full support to python git cl format
Parses git diff for changed python files in a method similar to
clang-diff and feeds the resulting line ranges into yapf.

Also sets the default style to the yapf file included in depot tools
by searching parent directories of each changed file to find a yapf
style config (.style.yapf). If none is found the default style
file will be the chromium .style.yapf included in depot tools.

Note: Even if line ranges are specified, yapf will fix indentation
issues for the entire file.
This is intended see https://github.com/google/yapf/issues/499
This may cause some issues if git cl format is run on a file
with lots of indentation issues or on a file or when run on a
third_party file that is formatted with pep8 and does not include
a .style.yapf and may make many more changes then the user expects.

Still undecided on whether this should be turned on by default but
if not I think the non --full support is a positive change anyways.

Bug:846432
Change-Id: Ib85797f4a8e1021870901ff465ec10f7e70deb87
Reviewed-on: https://chromium-review.googlesource.com/1249642
Commit-Queue: Aiden Benner <abenner@google.com>
Reviewed-by: Nodir Turakulov <nodir@chromium.org>
Reviewed-by: agrieve <agrieve@chromium.org>
7 years ago