Commit Graph

1014 Commits (ff061c0d1d2d30909e201487cc72c106335ac3c6)

Author SHA1 Message Date
tobiasjs 2836bcf810 Support additional user presubmit scripts named PRESUBMIT*.py.
This allows users to specify additional local presubmit tests that
do not need to exist as locally maintained changes to PRESUBMIT.py
files.

BUG=

Review-Url: https://codereview.chromium.org/2232203002
9 years ago
iannucci e38699bd95 Fix broken git tests on mac.
Unfortunately there's a bunch of other broken stuff, but it's something :/

R=agable@chromium.org, thakis@chromium.org
BUG=607344

Review-Url: https://codereview.chromium.org/2244023003
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
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
agable 565adb55a6 Have presubmit accept various Code-Review label configurations
Since different projects can have different configurations for what
the maximum value of the "Code-Review" label is in Gerrit, this teaches
presubmit_support to inspect the maximum configured value and see who
has granted it (the same behavior as the Submit button in Gerrit itself).

R=andybons@chromium.org, martiniss@chromium.org, tandrii@chromium.org
BUG=630738

Review-Url: https://codereview.chromium.org/2178673002
9 years ago
smut ae7ea3167e Revert "Remove all safesync_url functionality from gclient"
This reverts commit 99a7f80578.
This reverts commit 2697cd19a7.
This reverts commit 8c51b6f148.
This reverts commit d4aedc811b.

Reason for revert:
Breaks iOS release branch builds.

BUG=623762
TBR=agable,maruel

Review URL: https://codereview.chromium.org/2162583004 .
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
mbjorge f2d73522b8 Fix relative file: paths in OWNERS with roots other than '/'
If an OWNERS file used the file: directive with a relative file
path, but was using a root other than '/' (e.g.
'/path/to/my/real/root'), then the include resolver would incorrectly
leave a leading '/' on the include path. When os_path.join was then
called, the leading '/' meant the path was treated as an absolute path
and the join did not behave as expected.

Review-Url: https://codereview.chromium.org/2148683003
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 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
agable d4aedc811b Switch gclient config to default to unmanaged mode.
BUG=339055
R=hinoka@chromium.org

Review-Url: https://codereview.chromium.org/2099153003
9 years ago
agable 99a7f80578 Remove all safesync_url functionality from gclient
R=maruel@chromium.org
BUG=109184

Review-Url: https://codereview.chromium.org/2087313002
9 years ago
agable 96e179bba0 Better error checking in git freeze
R=iannucci@chromium.org
BUG=567157

Review-Url: https://codereview.chromium.org/1527403002
9 years ago
agable 02b3c98b76 Make git-freeze bail out if the user has too much untracked data.
R=iannucci@chromium.org
BUG=376099

Review-Url: https://codereview.chromium.org/2052113002
9 years ago
agable 7aa2ddd81d Refactor git_common config and die
R=iannucci@chromium.org
BUG=376099

Review-Url: https://codereview.chromium.org/2075603002
9 years ago
tandrii 9d20675998 git cl test framework: improve debuggability of expected calls.
R=phajdan.jr@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2074233002
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
mgiuca 1dfe43ca1a Simplify octal constants in Python code (e.g. 0o0700 -> 0o700).
Review-Url: https://codereview.chromium.org/2075923003
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
vapier 8057ac8802 use py3 compatible octal constants
Review-Url: https://codereview.chromium.org/2076613002
9 years ago
dcheng 091b7db64c Expose fnmatch in presubmit's input_api.
BUG=611905

Review-Url: https://codereview.chromium.org/2070493002
9 years ago
scottmg 0205656321 drover win: Use --stdin so update-index doesn't fail on long cmdline
git update-index would fail on long command lines when setting up
a resolve. Instead of passing all the files names on the command line,
pass them through --stdin and a file handle.

BUG=598808

Review-Url: https://codereview.chromium.org/2067653002
9 years ago
scottmg f3c688bf2c Fix presubmit checkout test after git 2.9.0
Quoting https://github.com/blog/2188-git-2-9-has-been-released

"""Rename detection is now enabled by default for diffs..."

which broke this test.

R=tandrii@chromium.org, iannucci@chromium.org
BUG=619959

Review-Url: https://codereview.chromium.org/2073553003
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 1c67da672d Mock stdout to avoid pollutting test runner stdout.
TBR=kmarshall@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2055003003
9 years ago
seanmccullough 0b67044c35 [depot_tools] Add gendered pronoun presubmit check.
Review-Url: https://codereview.chromium.org/2046003002
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
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 f2aa52b562 Refactor git_footers for later use in git cl.
Motivation: git_cl should start understanding Gerrit's git footers,
to avoid appending BUG= after Change-Id: Ixxx line.

R=sergiyb@chromium.org
BUG=614587

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300691 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org d605a51ccb git cl desc: add test that shows BUG= breaking Change-Id footer.
BUG=614587
R=yyanagisawa@chromium.org,andybons@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300690 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
bradnelson@chromium.org cfbab8fc1f Dropping remaining scons references.
The old hammer entry points and use of scons for chromium is long gone.
Dropping it.

BUG=None
TEST=None
R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300667 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
martiniss@chromium.org 456ca7f0c2 tryserver recipe_module: Add get_tags.
Lets you get CL tags for a given CL.

BUG=591172

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300658 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org 830dc0bca8 Properly expose already used elsewhere functionality.
Also make _RietveldOwnerAndReviewers have same semantics as before,
to resolve immediate bug until chromium checkouts of developers are
updated.

BUG=609832
R=machenbach@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300494 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
dbeam@chromium.org 78d65556a8 Remove unused PresubmitAddReviewers
R=dpranke@chromium.org
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300488 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
iannucci@chromium.org afa11acce5 Reland: Add ability to override DEPS file in recursedeps
This will allow ANGLE to have a recursible deps-file in their repo instead of
relying on chromium's DEPS file to specify an accurate dependency for itself.

Previously: https://chromiumcodereview.appspot.com/1919103003/

R=agable@chromium.org, dpranke@chromium.org, jmadill@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300446 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