Commit Graph

665 Commits (289b43183e98bdec9e8bc45be1eb462876cccebc)

Author SHA1 Message Date
Robert Iannucci db02dd0524 [git-cl] modify change description before committing.
Otherwise if update_reviewers needs to modify the commit message it won't
show in gerrit.

Bug:

Change-Id: Id81db48b7d15bd17cb924d1d046b31f2c48defa7
Reviewed-on: https://chromium-review.googlesource.com/482062
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Robert Iannucci 100aa213c6 [git-cl] set math is done with | not +
TBR=tandrii@chromium.org

Bug:

Change-Id: I1f533344b915bc4581739f508978f837a8c90f8c
Reviewed-on: https://chromium-review.googlesource.com/481073
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Aaron Gable 6f5a8d9987 Flip gerrit_util to raise exceptions on 404 by default
This makes the library behave more like what we'd expect,
while still allowing certain function to specify that
returning 204 or 404 is expected/acceptable behavior.

Change-Id: If3ce5598d1603819ee97aaeab0072a9e786ed96d
Reviewed-on: https://chromium-review.googlesource.com/481043
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 19ee16c860 Reland "Refactor ReadHttpResponse to be error-friendlier"
Gerrit sometimes returns a full response json object at
the same time as returning a non-200 status code. This
refactor makes it easier for calling code to request
access to that object and handle error cases on its own.

The original version of this commit had a bug where
ReadHttpResponse properly set the default value for
accept_statuses, but all calls which came through
ReadHttpJsonResponse were setting None instead.

Bug: 710028
Change-Id: I8cee435d8acd487fb777b3fd69b5e48e19d2e5a3
Reviewed-on: https://chromium-review.googlesource.com/481060
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Robert Iannucci a28592e50a [git-cl] fix assertion.
We want to assert that if add_owners_to is provided, change is also
provided.

Bug:

Change-Id: I0b9674dcd1cdd5e42a8ab92583570ecc02ba1dcd
Reviewed-on: https://chromium-review.googlesource.com/481040
Reviewed-by: Daniel Jacques <dnj@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Aaron Gable 382674be12 Revert "Refactor ReadHttpResponse to be error-friendlier"
This reverts commit 6d7ab1bfe5.

Reason for revert: Stacktrace:
 File "/s/depot_tools/gerrit_util.py", line 816, in GetAccountDetails
   return ReadHttpJsonResponse(conn)
 File "/s/depot_tools/gerrit_util.py", line 376, in ReadHttpJsonResponse
   fh = ReadHttpResponse(conn, accept_statuses)
 File "/s/depot_tools/gerrit_util.py", line 365, in ReadHttpResponse
   if response.status not in accept_statuses:
TypeError: argument of type 'NoneType' is not iterable

Original change's description:
> Refactor ReadHttpResponse to be error-friendlier
> 
> Gerrit sometimes returns a full response json object at
> the same time as returning a non-200 status code. This
> refactor makes it easier for calling code to request
> access to that object and handle error cases on its own.
> 
> Bug: 710028
> Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
> Reviewed-on: https://chromium-review.googlesource.com/479450
> 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
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true

Change-Id: Ia9d9ce835e207a32e7cc8ee35c0cf40c823c7b78
Reviewed-on: https://chromium-review.googlesource.com/481059
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Robert Iannucci 6c98dc69b2 [git-cl] add --tbrs flag.
Bug:

Change-Id: I6c8ffaa5d8b934e287c97b97faf6909df5d02978
Reviewed-on: https://chromium-review.googlesource.com/479781
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable 6d7ab1bfe5 Refactor ReadHttpResponse to be error-friendlier
Gerrit sometimes returns a full response json object at
the same time as returning a non-200 status code. This
refactor makes it easier for calling code to request
access to that object and handle error cases on its own.

Bug: 710028
Change-Id: Id1017d580d2fb843d5ca6287efcfed8775c52cd6
Reviewed-on: https://chromium-review.googlesource.com/479450
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Robert Iannucci f2708bd74a [git-cl] add --r-owners
This will be useful for tools like the recipe autoroller to
semi-intelligently choose a collection of reviewers.

Bug:

Change-Id: I7a238127e126340c033fc8e80523ef2408ebf970
Reviewed-on: https://chromium-review.googlesource.com/479679
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 550e924d20 Gerrit git cl upload <diff_base>: respect diff_base argumnent.
This CL propagates <diff_base> all the way to become parent commit
of the syntentic commit generated by squashing the current branch.

BUG=649846
R=agable@chromium.org

Change-Id: Ided7ebbb5c3a1114cac18adb62b3a9c27610018c
Reviewed-on: https://chromium-review.googlesource.com/475229
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Jochen Eisinger d0573ec067 Use OldContents() for OWNERS files to do checks
BUG=141253
R=dpranke@chromium.org

Change-Id: Iacbc2f0571e725e4f2ccf5ea7878f101972289bb
Reviewed-on: https://chromium-review.googlesource.com/476610
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Aaron Gable a1bab27a25 Give Rietveld git-cl-status the 'not lgtm' state
While working on fixing git-cl-status for gerrit, I realized
it would be really easy to bring the Rietveld version up to
parity and simplify it at the same time.

Bug: 706460
Change-Id: Icff32b532fa29f8869205111cd117176e0d34b8f
Reviewed-on: https://chromium-review.googlesource.com/470448
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable 9ab38c6885 Fix gerrit git-cl-status to be simpler and correct
The loop over the messages didn't early-exit when it found
a non-CQ message, so it would continue looking until it
found any message by a non-owner. So all CLs with any comments
by anyone other than the uploader would be in 'reply' state
forever.

This CL fixes that, and also makes some other tweaks to
make the gerrit status code simpler and faster.

Bug: 706460
Change-Id: I5cc06962f5121fe042a315e5e2e205e556eb85da
Reviewed-on: https://chromium-review.googlesource.com/470586
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 51acef998a Shamelessly plug $ git cl creds-check into yet another place.
R=machenbach@chromium.org

Bug: 689543
Change-Id: I73607e7afe78bac3bbe509fe9c4387dfd0095011
Reviewed-on: https://chromium-review.googlesource.com/474138
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov c971239edd git cl patch <url>: better handling of URLs.
* if --rietveld or --gerrit is given, parse only using appropriate
  parser.
* if url has '$HOST-review' in the beginning, assume it's Gerrit
* if type of codereview is detected based on URL, then print this
  information for the user.
  This also applies to `git cl description` but message is logged instead,
  because in '-d|--display' option git cl is supposed to print only description,
  and some tooling likely relies on this :(

R=jochen@chromium.org
BUG=706406

Change-Id: I21c9355c5334fd71db27618cda11287f75168b59
Reviewed-on: https://chromium-review.googlesource.com/473186
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
8 years ago
Andrii Shyshkalov 90f3192799 git cl: remember codereview type when parsing issue/change URL.
R=jochen@chromium.org
BUG=706406

Change-Id: I477d1cf629bb0bccebead6e5c0189830ea76be7e
Reviewed-on: https://chromium-review.googlesource.com/472867
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
8 years ago
Andrii Shyshkalov 28d840eb31 git cl patch: when URL matches both codereview systems, choose rietveld.
This is temporary, and will be changed in subsequent CLs. For now,
it suffices to stop relying on pseudo-random dictionary order in tests
and prod.

R=jochen@chromium.org
BUG=706406

Change-Id: I26c467a28bc63b5f81d20fc222a2b6f0511c507f
Reviewed-on: https://chromium-review.googlesource.com/472750
Reviewed-by: Jochen Eisinger <jochen@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 2d8a2074c5 Gerrit git cl upload: if -m is given, don't prompt for patchset title.
R=sergiyb@chromium.org
BUG=697625

Change-Id: I493bcc9212baf9030270cb71cf75ac969a67f2a0
Reviewed-on: https://chromium-review.googlesource.com/472724
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
Andrii Shyshkalov 70909e1ed3 git cl comment: cleanup mistakenly left TODO.
R=sergiyb@chromium.org

Change-Id: Ieea94428c7d9932242fb57b80afc1cf366b7bb54
Reviewed-on: https://chromium-review.googlesource.com/472827
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov e00a29ba9e Gerrit git cl upload -f should not ask for title.
R=sergiyb@chromium.org
BUG=697625

Change-Id: I2c3ad4e9380bd667c149be09eabeb5af0a5ab020
Reviewed-on: https://chromium-review.googlesource.com/472749
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 9d93221fb9 git cl: suggest running git cl creds-check after git push failures.
R=sergiyb@chromium.org
BUG=708785

Change-Id: Ib29be04cda18b0b1187893e555a4c5a7ea753e6e
Reviewed-on: https://chromium-review.googlesource.com/472866
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov fbee165093 git cl: remove temporary workaround of invisible unicode char in emails.
PolyGerrit used to surround emails with invisible unicode char, which
resulted in reviewers not being found by Gerrit. It has since been
fixed (handled in Google internal bug b/34702620).

R=sergiyb@chromium.org

Change-Id: I43ade0ef23d88611081744eff57129a69b5176c8
Reviewed-on: https://chromium-review.googlesource.com/472808
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Jochen Eisinger eb7447605b Configure path to OWNERS.status file via toplevel OWNERS
BUG=694222
R=dpranke@chromium.org

Change-Id: Ie841332129dd6fa8555d2e940c919b812fc9408d
Reviewed-on: https://chromium-review.googlesource.com/467250
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
8 years ago
Andrii Shyshkalov febbae9d2e Revert "git cl upload for Gerrit: use push options instead of refspec."
This reverts commit 0267fd2c29.

Reason for revert: seems to have changed some behavior as reported by SKIA.

Original change's description:
> git cl upload for Gerrit: use push options instead of refspec.
> 
> This removes limitation of no special chars in patchset titles.
> 
> BUG=chromium:663787,chromium:707963,gerrit:5184
> R=​sergiyb@chromium.org,agable@chromium.org
> TEST=uploaded this CL using depot_tools with this patch :)
> 
> Change-Id: I5d684d0a0aa286a45ff99cca6d57aefa8436cd0f
> Reviewed-on: https://chromium-review.googlesource.com/468926
> Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
> Reviewed-by: Sergiy Byelozyorov <sergiyb@google.com>
> 

TBR=agable@chromium.org,sergiyb@google.com,tandrii@chromium.org,sergiyb@chromium.org,borenet@chromium.org,chromium-reviews@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:663787,chromium:707963,gerrit:5184

Change-Id: I3306091b14b97a200150389d0480b69120af8c61
Reviewed-on: https://chromium-review.googlesource.com/469006
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 0267fd2c29 git cl upload for Gerrit: use push options instead of refspec.
This removes limitation of no special chars in patchset titles.

BUG=chromium:663787,chromium:707963,gerrit:5184
R=sergiyb@chromium.org,agable@chromium.org
TEST=uploaded this CL using depot_tools with this patch :)

Change-Id: I5d684d0a0aa286a45ff99cca6d57aefa8436cd0f
Reviewed-on: https://chromium-review.googlesource.com/468926
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@google.com>
8 years ago
Jochen Eisinger 72606f8c24 Add support for a global status files for OWNERS
This allows for having some global comments such as timezones or
long-term unavailability.

The comments go into build/OWNERS.status (that way, they should be
available in all repos that map in build/ for the gn config files).
The local can be overwritten in codereview.settings.

The format is

email: status

Comments (starting with #) are allowed in that file, but they're ignored.

BUG=694222
R=dpranke@chromium.org

Change-Id: I49f58be87497d1ccaaa74f0a2f3d373403be44e7
Reviewed-on: https://chromium-review.googlesource.com/459542
Commit-Queue: Jochen Eisinger <jochen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
8 years ago
Aaron Gable f97e33d27f Gerrit git-cl: special-case branches tracking 'master'
This is a hack to support the most common git workflow: keeping
a local branch named 'master' which is a replica of 'origin/master'
with no local changes, and basing all feature branches off of
that.

Test:
* created master branch, created feature branch, uploaded CL correctly
* created master branch, landed change on master branch, created
  feature branch, uploaded CL, CL contains change on master too
* created non-master branch, created feature branch, failed to
  upload CL

Bug: 682104
Change-Id: I8481b787e6dcab162d2846c07f1ddad950f491e0
Reviewed-on: https://chromium-review.googlesource.com/464107
Reviewed-by: Andrew Bonventre <andybons@google.com>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Robert Iannucci 09f1f3ddc7 [git-cl] Add cl methods for dealing with git footers.
This is needed for making PostUploadHooks that don't have to re-invent
the git footers library.

Bug:

Change-Id: I0a0ccf3dffd25152c2c273487ddbd9b279d80678
Reviewed-on: https://chromium-review.googlesource.com/461729
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Andrii Shyshkalov 4812e6180b git cl creds-check: add empty line to clearly indicate report.
R=sergiyb@chromium.org
BUG=689543

Change-Id: Ifb0bc9a03da09cb81ba94c310ae59cfee69b7de1
Reviewed-on: https://chromium-review.googlesource.com/461137
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov aa31b97b2e git cl land for not Gerrit: add autorebasing.
Bug: 682934
Tested: https://chromium.googlesource.com/infra/experimental/+log/aef8ad..0378e4
Adapted-from: https://chromium-review.googlesource.com/c/431976/
Change-Id: Ida8141bc92d7501d8e17a1b8571033180f02a7b3
Reviewed-on: https://chromium-review.googlesource.com/458353
Reviewed-by: Aaron Gable <agable@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Pierre-Antoine Manzagol d5bc73d467 Fix 'git cl format' on windows metrics files
The issue is with directory separators:
"Check that c:\src\chromium\src or 
c:\src\chromium\src\tools/metrics/histograms/pretty_print.py
exist and have execution permission."

BUG=679514

Change-Id: I88a57783ca3bf8aa5af4d83fb34901c2d2385fe9
Reviewed-on: https://chromium-review.googlesource.com/457800
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
Commit-Queue: Pierre-Antoine Manzagol <manzagop@chromium.org>
8 years ago
Andrii Shyshkalov bb86fbbef1 git cl upload for Gerrit: warn if uploader is not CL owner.
R=agable@chromium.org
BUG=653172

Change-Id: I141a1422a8f526040fe80522a41d14e2cd8cfc07
Reviewed-on: https://chromium-review.googlesource.com/458421
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Aaron Gable 3a16ed155e Use Bug: footer for Gerrit CLs
Note that because it is now a gerrit footer, it both appears in the same block
as the Change-Id footer (no blank line between them), and isn't guaranteed to be
above the Change-Id footer. This doesn't matter during "git cl upload", when
a Change-Id hasn't been allocated yet, but will show up during "git cl
description".

Bug: 681184
Change-Id: I2ab6fc13be8e992709618a666012410b1a7c02de
Reviewed-on: https://chromium-review.googlesource.com/446660
Commit-Queue: Aaron Gable <agable@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Andrii Shyshkalov 0d6b46e32b git cl comment: require explicit --codereview with -i|--issue flag.
R=agable@chromium.org,machenbach@chromium.org
BUG=698236

Change-Id: If79f938e457f176c47badd75f78ed4ecb764ec2d
Reviewed-on: https://chromium-review.googlesource.com/456700
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 5a0cf20452 git cl comment: implement fetching comments for Gerrit.
R=agable@chromium.org,machenbach@chromium.org
BUG=698236

Change-Id: I36dcd2f10d0518a9f04a766e09c1ab00f2ce4d3b
Reviewed-on: https://chromium-review.googlesource.com/456699
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov d8aa49f35b git cl comment: refactor fetching comments for Rietveld and add tests.
R=agable@chromium.org,machenbach@chromium.org
BUG=698236

Change-Id: I04e264130952e3e270540fae8381db544cf40e7c
Reviewed-on: https://chromium-review.googlesource.com/456697
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 680253d315 git cl description: don't bother if description diff is trailing whitespace.
BUG=700239
R=iannucci@chromium.org

Change-Id: Ica4567288c1cd83f72cce5d10c523270b69c36d4
Reviewed-on: https://chromium-review.googlesource.com/455739
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 625986dba7 git cl comment: implement adding comment for Gerrit.
BUG=698236

Change-Id: Ia1a36af71c348be991d77083092c5043c2642c19
Reviewed-on: https://chromium-review.googlesource.com/455877
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 0a0b067e6b git cl creds-check: add reporting.
BUG=689543

Change-Id: I2c5dd9e1ef4a23ba805c8c057ad44c87cfb65a5b
Reviewed-on: https://chromium-review.googlesource.com/455782
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 9780050b24 git cl creds-check: add methods analysing .gitcookies.
These methods are used to produce report in the next CL.

BUG=689543

Change-Id: I71b2705ac8b046103b4982d47f7ec97f8ef7818b
Reviewed-on: https://chromium-review.googlesource.com/455838
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Aaron Gable d343c63519 git-cl patch: set metadata before (failing to) apply patch
If the commit or cherry-pick command fails, git automatically drops
the user into a state where they can try to manually fix it. That's
great. But with the old call order, it would also leave the metadata
unset. This sets the issue and patchset number before doing the
potentially-failing heavy lifting, so that the branch will be in a
consistent state after the user finishes fixing up the failed command.

BUG=701130

Change-Id: I792b9fb9e61ba62626c19aa1837d21f8cd8f594e
Reviewed-on: https://chromium-review.googlesource.com/456039
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 34924cd4f0 git cl creds-check: add pretty printing of existing creds.
BUG=689543

Change-Id: I085f3e086059ecf3b57a8e0cd0d716adc54f8644
Reviewed-on: https://chromium-review.googlesource.com/454816
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 517948b6d1 git cl creds-check: refactor gitcookies methods into a class.
There will be many other methods that will need to share state.

BUG=689543
R=machenbach@chromium.org

Change-Id: I4ce6fe173ff7c92e57737417c65125156606a664
Reviewed-on: https://chromium-review.googlesource.com/455780
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Andrii Shyshkalov 353637c534 Add `git cl creds-check` to clean Git/Gerrit creds interactively.
BUG=689543

Change-Id: I0ba24c46f36c505fae03aaeab3b277e80bca8f8b
Reviewed-on: https://chromium-review.googlesource.com/454696
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov abc26ac029 git cl: refactor common user interactions.
R=machenbach@chromium.org
BUG=

Change-Id: Id3e3fe6223a875d997ac5569137db270818a08f4
Reviewed-on: https://chromium-review.googlesource.com/453439
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
8 years ago
Mark Mentovai 57c4721d81 git-cl: Make BUG_LINE_FORMAT configurable in codereview.settings
The default BUG_LINE_FORMAT is the existing BUG=%s. Projects that wish
to begin using Gerrit-style footers like Bug: %s can now set this in
codereview.settings.

BUG=616753

Change-Id: I4470311a86db228eab2a1655ae884736cce8c380
Reviewed-on: https://chromium-review.googlesource.com/451565
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Mark Mentovai 600d309d6c git-cl: Recognize Bug: when reading change descriptions
When git-cl doesn’t see a BUG= line, it introduces a new one. The
eventual goal is to switch away from THIS=TYPE of metadata to the footer
field style that’s more natural to git and, most importantly, Gerrit.
With this change, git-cl will treat an existing Bug: line identically to
a BUG= line, and not introduce a new BUG= line if either are present.
This stops short of switching the default format to Bug:, but it allows
projects that wish to switch to the new format now to not be pestered by
git-cl introducing BUG= every time it edits a change description.

This is similar to the bug line parsing done by Bugdroid, which already
undersatnds the Bug: format. See
https://chromium.googlesource.com/infra/infra/+/ba095768d776/infra/services/bugdroid/log_parser.py.

BUG=616753

Change-Id: I23faa55c8275de44b71b031e603f2f55778d7f25
Reviewed-on: https://chromium-review.googlesource.com/451123
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 3e631421d2 Gerrit git cl upload: abort early if change is submitted or abandoned.
BUG=689652
R=agable@chromium.org,martiniss@chromium.org

Change-Id: Ib9f5b08f5b31a1519a5f5916042885967a263d88
Reviewed-on: https://chromium-review.googlesource.com/443325
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Alexei Svitkine f3cac41546 Integrate metrics XML file pretty print into git cl format.
Depends on: https://codereview.chromium.org/2674283002/

BUG=679514

Change-Id: I61611fc19724028bb8cdefefc50b4d5d3bb77a46
Reviewed-on: https://chromium-review.googlesource.com/437919
Commit-Queue: Alexei Svitkine <asvitkine@chromium.org>
Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
8 years ago
Kenneth Russell 61e2ed43fb Moved EnsureCQIncludeTrybotsAreAdded to OutputApi.
This makes them accessible to presubmit scripts' PostUploadHook.

Fixed bugs where caching needed to be bypassed in order for
sequential PostUploadHooks to see each others' results.

BUG=688765

Change-Id: I56c0c6b6419e2474f4b7f701be036fb2a524f8e3
Reviewed-on: https://chromium-review.googlesource.com/439877
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
8 years ago
Andrii Shyshkalov af3a9993de git cl: add temporary workaround for u200 chars in PolyGerrit.
(edited, so that next next line gets u200 char 
between R= and reviewer email)

R=​​mstarzinger@chromium.org
TBR=agable@chromium.org
BUG=b/34702620 (internal)

Change-Id: I58f2528dd28e3a43d8eb2d7d4f5c046460d8a9ee
Reviewed-on: https://chromium-review.googlesource.com/440085
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 83051152f3 git cl: fix bugs in UpdateDescription.
R=kbr@chromium.org
BUG=633572,688765

Change-Id: I05130cfd05f89a4605c34b15cadf13a33e3565d9
Reviewed-on: https://chromium-review.googlesource.com/439445
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
8 years ago
Andrii Shyshkalov 3186301a4e git cl: allow to forcibly bypass cache and fetch CL description.
R=kbr@chromium.org
BUG=633572,688765

Change-Id: I2ce6530148bc2f00fe9f6a80aaccc520c69a2f83
Reviewed-on: https://chromium-review.googlesource.com/439186
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
8 years ago
Andrii Shyshkalov e9c78ffc95 git cl for Gerrit: add support for local git cache checkouts.
R=machenbach@chromium.org
BUG=689035

Change-Id: Ib7a56c52501a5d0dd6638a99bde3d376bd27bfb6
Reviewed-on: https://chromium-review.googlesource.com/438347
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Aaron Gable eb3af71509 git-cl: don't prompt after cleaning patchset title
BUG=688099

Change-Id: Ic505ab6553b1a9f1e6ab51377bb6519d805a847e
Reviewed-on: https://chromium-review.googlesource.com/436406
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Andrew Bonventre <andybons@chromium.org>
Commit-Queue: Aaron Gable <agable@chromium.org>
8 years ago
Andrii Shyshkalov 7afd16467e Follow up on Gerrit git cl status: do not treat CQ comment as reviewer reply.
TBR=sergiyb@chromium.org,agable@chromium.org
BUG=

Change-Id: I37f02556f254fbdc78ab30e990a7cc6d05120038
Reviewed-on: https://chromium-review.googlesource.com/434477
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
8 years ago
Andrii Shyshkalov 33e88a4e19 Gerrit git cl status: do not treat CQ comment as reviewer reply.
R=sergiyb@chromium.org,agable@chromium.org
BUG=

Change-Id: I7684923c19fe7441cdd52b7707c28f01c95a4ba4
Reviewed-on: https://chromium-review.googlesource.com/433699
Commit-Queue: Andrii Shyshkalov <tandrii@chromium.org>
Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org>
8 years ago
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>
8 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