Some SVN-only trybots get errors when running gclient revert with this
change. I assume it's because the flag is not present for the gclient
revert command, and that the code checking if options.with_branch_heads
is set is common to both revert and sync.
BUG=none
TEST=reverted locally and gclient revert worked again.
Review URL: https://chromiumcodereview.appspot.com/12616006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186967 0039d316-1c4b-4281-b951-d872f2087c98
This will replace the hack in commit-queue/verification/presubmit_shim, and will
be used on the presubmit trybot.
R=maruel@chromium.org
BUG=
Review URL: https://codereview.chromium.org/12481002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186922 0039d316-1c4b-4281-b951-d872f2087c98
The "branch-heads" are refspecs created from upstream svn branches. This flag
is mostly needed for official builders, and adds about 1/2GB of data to the
checkout, so not currently enabling by default.
Review URL: https://codereview.chromium.org/12546017
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186598 0039d316-1c4b-4281-b951-d872f2087c98
If we uploaded a CL w/o any reviewers specified, and then
ran the owners check on it (so that we had a Rietveld
issue number) we would crash in a Python assertion. This
wasn't caught in unit testing because of a limitation
in the unit test scaffolding.
TBR=maruel@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/12546003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186454 0039d316-1c4b-4281-b951-d872f2087c98
Until an issue is uploaded to Rietveld, we don't know the official
email address to use for an owners check. There are three ways to fix
this: we could attempt to log in to rietveld prior to doing the check
and extract the address to use, or we could use ~/.last_codereview_email_address,
or we can use the email address we can determine from the checkout.
All three options have flaws; the first is particularly awkward since there
doesn't seem to be a good way to fetch the email without posting an issue.
The second is flawed if we use different addresses for different repos,
and the third is flawed if the checkout's email address is different from
the rietveld address, or if it is anonymous.
However, since this is only being used for owners checks (in this case),
anonymous checkouts probably don't matter, and hopefully the cases where
the email addresses differ are rare.
R=maruel@chromium.org
BUG=118388, 150049
Review URL: https://chromiumcodereview.appspot.com/12377023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186259 0039d316-1c4b-4281-b951-d872f2087c98
Move watchlist generation out of RunHooks so that bypass-hooks
does not skip watchlists.
BUG=163406
Review URL: https://chromiumcodereview.appspot.com/12295004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185979 0039d316-1c4b-4281-b951-d872f2087c98
Right now we require approval from someone, and we require an owner
approval, but we don't require an approval from an owner *other than
the patch other*. It's conceivable that we might want this, so
I am making this a configurable argument to the presubmit check.
This will also be needed to ensure that we don't suggest you as an
owner for your own patches, when we actually know who you are.
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/12326151
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185294 0039d316-1c4b-4281-b951-d872f2087c98
Currently, when we run the OWNERS check, we print the list of directories
that contain the relevant OWNERS files for any modified files in a change
still needing approval.
This has two problems:
1) if we bubble all the way up to the top level OWNERS, we print "" instead of
"src/" or something more useful (bug 157191)
2) for OWNERS files that contain per-file set-noparent entries (like changes to IPC messages), this can be really confusing because an owner of other stuff in the directory might've approved things already.
This change will now print the list of files in the CL that are still unapproved.
This might be a lot more verbose (since you get N lines rather than 1 for N files in a given directory), but hopefully it'll be clearer in the two cases above.
Also, this change takes care of some lingering clean-up in the code to rename some methods to be clearer.
R=maruel@chromium.org
BUG=157191
Review URL: https://chromiumcodereview.appspot.com/12314044
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@184219 0039d316-1c4b-4281-b951-d872f2087c98
Printing the list of all the files examined can produce a lot
out of output and bury the interesting output.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12315031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183813 0039d316-1c4b-4281-b951-d872f2087c98
We were passing a unicode string in the env block to subprocess.Popen which makes it unhappy. This forces the string to ascii first.
BUG=NONE
TEST=NONE
Review URL: https://chromiumcodereview.appspot.com/12255083
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183569 0039d316-1c4b-4281-b951-d872f2087c98
The Android WebView code includes several manually-maintained .mk files
that are included by the Android build system. These contain some fairly
long lines as they need to refer to deep pathnames, which means the CQ
cannot be used as it always triggers a presubmit warning.
Allow .mk files to have 200 columns per line instead, which should be
enough for the long paths that are used. Add a test case for this.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12252067
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182733 0039d316-1c4b-4281-b951-d872f2087c98
gpylint doesn't like the use of "type" as a variable name (redefining a
builtin) - change the signature of the method to use the exc_ prefix
like sys.exc_*. The variables are not actually used anyway.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12255048
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182722 0039d316-1c4b-4281-b951-d872f2087c98
This fix adds the crosbug.com shorturl scheme for the chromium-os project.
BUG=None
TEST=manual run of ./my_activity.py
Review URL: https://chromiumcodereview.appspot.com/12226135
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182300 0039d316-1c4b-4281-b951-d872f2087c98
This is basically a wrapper script for running a WebKit change against
the try bots. It can be run from within third_party/WebKit and will try to apply the patch against ToT WebKit.
This tells the try server we want to use ToT WebKit by passing third_party/WebKit@HEAD as the first line of the patch file.
BUG=None
Review URL: https://codereview.chromium.org/12226013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@181972 0039d316-1c4b-4281-b951-d872f2087c98
Chromite will be added to the Chrome checkout at third_party/chromite -
detect when the checkout is a gclient checkout, and look for chromite at
that path.
BUG=None
TEST=ran 'cbuildbot' in both a repo and gclient checkout.
Review URL: https://chromiumcodereview.appspot.com/12094111
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@181563 0039d316-1c4b-4281-b951-d872f2087c98
Use closest git commit to the target svn revision.
Otherwise --checkout may be required to create
a git commit for a specific svn revision.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11886086
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@179023 0039d316-1c4b-4281-b951-d872f2087c98
The old code would always exit 0, because it returned the exit status of the if command
BUG=none
TEST=try to run git crup in src/ with unstaged changes. Should bail out and not run hooks
R=szager@chromium.org
Review URL: https://chromiumcodereview.appspot.com/12040046
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@178356 0039d316-1c4b-4281-b951-d872f2087c98
Very long comments, like when posting a diff that failed to apply, cause extra
burden on the Commit Queue logs.
TBR=csharp@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11929027
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177713 0039d316-1c4b-4281-b951-d872f2087c98
r176777 introduced a change that relied on os.path.samepath, which does not exist on Windows.
BUG=
Review URL: https://chromiumcodereview.appspot.com/12021013
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177701 0039d316-1c4b-4281-b951-d872f2087c98
previously we would return "*" as one of the suggested owners when
a CL included a file that anyone could approve. If the change had
other owners, the "*" was unnecessary, and if the change only included
wildcard-owned files, "*" isn't very helpful, so I've changed the text slightly.
R=maruel@chromium.org
BUG=169168
Review URL: https://chromiumcodereview.appspot.com/11867016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177575 0039d316-1c4b-4281-b951-d872f2087c98
The previous --force-branch option is renamed --checkout (the old name preserved for backwards compatibility).
Usage:
--checkout Create a branch and check it out.
--create Create a branch.
-n, --name <name> Specify the name of branch to create or reset.
This will force the branch using 'git branch -f '.
-q, --quiet Quiet.
NOTRY=true
Review URL: https://chromiumcodereview.appspot.com/11962003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@177286 0039d316-1c4b-4281-b951-d872f2087c98
pylint checks were erronously excluded for PRESUBMIT.py files in
root directory of repos because the regex was getting a './' added.
R=iannucci@chromium.org
TBR=M-A
Review URL: https://chromiumcodereview.appspot.com/11880040
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@176777 0039d316-1c4b-4281-b951-d872f2087c98
This fixes a potential issue with RunPylint in windows where paths
can contain special characters.
TBR=iannucci@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11786007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175481 0039d316-1c4b-4281-b951-d872f2087c98
It's bad python practice to use a class-level member that is mutable. self.calls
is already initialized in __init__ so it's not useful (and dangerous) to have it
as a class member.
R=cmp@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11801018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175368 0039d316-1c4b-4281-b951-d872f2087c98
The AffectedSourceFiles query matches against files with paths relative
to repository root. On the other hand _FindAllFiles checks white_lists
and black_lists against files paths relative to PRESUBMIT.py
As a result, when a PRESUBMIT.py is not at RepositoryRoot, RunPylint
can misbehave.
I fix this by modifying the white_lists and black_list regexes to
include the relative directory of PRESUBMIT.py.
Also adding some logging to pylint and simplified misc logic.
Review URL: https://chromiumcodereview.appspot.com/11776016
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@175364 0039d316-1c4b-4281-b951-d872f2087c98