Commit Graph

441 Commits (4d843595aafd23e68d989efa47d9fa4819f8ad93)

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