Commit Graph

466 Commits (074beb2e46fbefdf85a6ba2526ad7079dd3ceb04)

Author SHA1 Message Date
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