Write a small HowTo to help confused people by confusing checks.
R=iannucci@chromium.org
BUG=
Review URL: https://codereview.chromium.org/137653003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@244717 0039d316-1c4b-4281-b951-d872f2087c98
It takes more than 10 seconds to lint some CLs. Silently
ignore the expected timeout.
R=maruel@chromium.org,iannucci@chromium.org
BUG=290402
TEST=none
Review URL: https://codereview.chromium.org/130493002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@243968 0039d316-1c4b-4281-b951-d872f2087c98
These options have been added to the 'git cl config' subcommand.
--deactivate-update tells git cl not to update the values inside
.git/config from the codereview.settings file. --activate-update does
the opposite.
This is designed for testing/development purposes only, for example, to
be able to change the rietveld URL.
BUG=327901
Review URL: https://codereview.chromium.org/104043008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@242943 0039d316-1c4b-4281-b951-d872f2087c98
It's possible in gclient to list multiple operating systems on the
command line and while handling them all perfectly might not be possible
it's possible to make it better than today.
This patch makes sure None never overrides any previous value and it
adds some output to indicate what kind of dangerous choices it made.
BUG=248168
Review URL: https://codereview.chromium.org/23875029
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240892 0039d316-1c4b-4281-b951-d872f2087c98
If os.kill(os.getpid(), signal.CTRL_C_EVENT) doesn't do what the
test author hopes it will do, the test will hang until it has calculated
a million out-of-thread/process results. That is approximately an
infinite hang.
BUG=
Review URL: https://codereview.chromium.org/110883004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240319 0039d316-1c4b-4281-b951-d872f2087c98
Code path:
1. plugins.sso_auth is imported, which adds the AuthHandler class to the global state.
2. HasConfiguredCredentials() in gslib/utils.py is called by gsutil, and will return true if "prodaccess" exists on the system, which tells the system that we don't want a no-op auth handler.
3. When a command is called, all the auth handlers are cycled through and sso_auth.SSOAuth is called, which calls a stubby command to emit a gaiamint'ed oauth2 access token, which is then used as the Authorization Header
if --bypass_prodaccess is passed in, then:
1. HasConfiguredCredentials() will bypass the check for prodaccess, as if it didn't exist.
2. plugins.sso_auth does not get imported.
Which will essentially cause gsutil to behave as if this patch never existed.
So the expected behavior is:
=.boto file does not exist, prodaccess exists, but unauthenticated=
Failure: No handler was ready to authenticate. 3 handlers were checked. ['OAuth2Auth', 'HmacAuthV1Handler', 'SSOAuth'] Check your credentials.
=.boto file exists, prodaccess exists, but unauthenticated=
sso_auth will raise NotReadyToAuthenticate, and the .boto file will be used instead
=.boto file exists, prodaccess exists, authenticated=
sso_auth will be run _after_ the default gsutil authenticator, which causes the sso_auth to be used over whatever the default authentication is.
bypass_prodaccess is passed in by default to upload_to_google_storage because we expect people who use upload_to_google_storage to not need prodaccess and have their own boto file already. Also the sso_auth plugin will only request a readonlyi token, which will not work for uploading.
BUG=258152
Review URL: https://codereview.chromium.org/86123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@240266 0039d316-1c4b-4281-b951-d872f2087c98
This is useful to diagnose slow tests. Make this multiprocessing aware. Stop
printing when the commands are added but use the proper message system instead.
R=iannucci@chromium.org
BUG=
Review URL: https://codereview.chromium.org/99453003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@238388 0039d316-1c4b-4281-b951-d872f2087c98
I've unified the checks for language specific exceptions to line length. There is a behavior change where cpp compiler directives no longer have a maximum line length (previously they were restricted to 150% of max line length). This change was made to match the behavior for java files.
BUG=NONE
Review URL: https://codereview.chromium.org/100163002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@238268 0039d316-1c4b-4281-b951-d872f2087c98
Tell download tools/hooks/commit-msg mannually if it looks broken.
chrome-internal-reviews.googlesource.com requires
authentication to access tools/hooks/commit-msg, and
we'll get Google Sign-in page rather than expected shell script.
R=szager@chromium.org,maruel@chromium.org,ilevy@chromium.org
BUG=
Review URL: https://codereview.chromium.org/87173002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237454 0039d316-1c4b-4281-b951-d872f2087c98
This is a serious bug, if a version is unpinned, it would become stuck at
whatever a local branch 'master' may point to. This is extremely bad when a
pinned dependency is unpinned on purpose, for example on a canary master. We
reproduced this problem on the chromium.swarm master by setting a custom_vars
swarming_revision to '', which then stopped syncing at the expected
origin/master commit but instead got stuck to what happened to be a local master
branch.
This happens on git dependencies if the main solution is using svn. This doesn't
happen on git checkouts using .DEPS.git due to bug 323233.
The issue looks like:
________ running 'git reset --hard HEAD' in '/path/src/tools/swarming_client'
HEAD is now at 4727bd5 Some commit
Checked out revision d908a546e28d1e9f85f5690cf6c3a080f06ba711
Note that HEAD and what is checked out do not match.
Also reduce the hardcoding of 'origin' by creating a variable named 'remote'.
R=petermayo@chromium.org
BUG=322961
Review URL: https://codereview.chromium.org/85473007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237332 0039d316-1c4b-4281-b951-d872f2087c98
Compatible with any git topology (multiple roots, weird branching/merging, etc.)
I can't get it to be any faster (in python). Suggestions welcome :).
On z600/linux, this takes 5.1s to calculate the initial count for 2e3de954ef0a
(HEAD on src.git at the time of writing). Subsequent lookups take ~0.06s. For
reference, this machine takes 3s to just list the revisions in sorted order
without any additional processing (using rev-list).
All calculations are stored in a git-notes-style ref with the exception that the
leaf 'tree' object which would normally be stored in a git-notes world is
replaced with a packed binary file which consists of records [hash int]. Each
run of this script will create only 1 commit object on this internal ref which
will have as its parents:
* The previous git number commit
* All of the target commits we calculated numbers for.
This ref is then excluded on subsequent invocations of rev-list, which means that
git-number will only ever process commit objects which it hasn't already
calculated a value for. It also prevents you from attempting to number this
special ref :).
This implementation only has a 1-byte fanout which seems to be the best
performance for the repos we're dealing with (i.e. on the order of 500k commit
objects). Bumping this up to a 2-byte fanout became extremely slow (I suspect
the internal caching structures I'm using are not efficient in this mode and
could be improved). Using no fanout is slower than the 1 byte fanout for lookups
by about 30%.
R=agable@chromium.org, stip@chromium.org, szager@chromium.org
BUG=280154,309692,skia:1639
Review URL: https://codereview.chromium.org/26109002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236035 0039d316-1c4b-4281-b951-d872f2087c98
Previously this relied on being able to track branches which didn't have a
remote refspec. Now we add a fake origin for the git-svn test repo, and use
--prefix so that git has a remote to track and the refs are correctly
namespaced.
Should also be backwards compatible with older versions of git.
R=maruel@chromium.org
BUG=
Review URL: https://codereview.chromium.org/61893006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@233649 0039d316-1c4b-4281-b951-d872f2087c98
This is needed for a further CL to unify TS and CQ using PRESUBMIT.py.
BUG=278554
Review URL: https://codereview.chromium.org/54373011
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@232813 0039d316-1c4b-4281-b951-d872f2087c98
Add retry for all git operations that speak to a remote. This
should smooth out issues with the git/gerrit-on-borg service.
Review URL: https://codereview.chromium.org/26234004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@229219 0039d316-1c4b-4281-b951-d872f2087c98
These are run for a given dependency after it has been synced but before its
DEPS have been synced. This will help to switch Chromium to depend on Skia's
git repository (skia:1638).
Review URL: https://codereview.chromium.org/25322002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@228651 0039d316-1c4b-4281-b951-d872f2087c98
The motivation for this CL is:
When a project is turned on to use GitCheckout with try job verifiers, then the CQ crashes because of line 64 in http://src.chromium.org/viewvc/chrome/trunk/tools/commit-queue/pending_manager.py
This is because revision can only be one of (None, int, unicode). This crash only happens when try jobs are used (which is why I did not see it before).
This CL changes the return type to be unicode instead of string.
Review URL: https://chromiumcodereview.appspot.com/25686005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@226743 0039d316-1c4b-4281-b951-d872f2087c98
This prevents private CLs to be automatically CC-ed to public mailing lists
unintentionally.
Review URL: https://chromiumcodereview.appspot.com/24257014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225925 0039d316-1c4b-4281-b951-d872f2087c98
This is in order to support 'features' like got_revision for build systems
unwilling to scrape the human-readable output of gclient in order to extract
basic information :)
R=agable@chromium.org, maruel@chromium.org
BUG=265618
Review URL: https://chromiumcodereview.appspot.com/23753008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225046 0039d316-1c4b-4281-b951-d872f2087c98
This solves a problem with "os.rename" sometimes failing with an
exception after cloning a dependency to a temporary directory. It's
possible the dying git processes still hold a handle to the directory.
Since gclient delete the temporary directory regardless of the success
of the process, it results in a lot of GB downloaded for nothing.
SafeRename solves this by retrying a few times if the renaming fails,
sleeping one second every time to get other processes the time to
release their lock on the directory. It gives up retrying after 15 times.
BUG=
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23875041
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224372 0039d316-1c4b-4281-b951-d872f2087c98
Previously we would suggest owners for the whole CL, rather than just
the files currently missing owner approval.
R=maruel@chromium.org
BUG=130978
Review URL: https://chromiumcodereview.appspot.com/23591064
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224183 0039d316-1c4b-4281-b951-d872f2087c98
Update subcommand to support examples, always disable format_description and
format_epilog and add colors when enabled.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/22824018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218180 0039d316-1c4b-4281-b951-d872f2087c98
Currently the output is:
Found line ending with white spaces in:
cc/trees/layer_tree_host_impl_unittest.cc, line 379
This format is extremely annoying because you must combine the
file and line number together by hand. A more standard format
for expressing a position in a file is filename:lineno. This
changes the format to match:
Found line ending with white spaces in:
cc/trees/layer_tree_host_impl_unittest.cc:379
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/22837004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@217405 0039d316-1c4b-4281-b951-d872f2087c98
git cl was using system git cl.
- replace git cl status with GIT_CL_STATUS var
- add tested depot_tools to tip of PATH.
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/20889002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214021 0039d316-1c4b-4281-b951-d872f2087c98
Convert monkey patching to class inheritance for OptionParser usage in:
commit_queue.py, gclient.py and trychange.py.
Monkey patching confuses the hell out of pylint.
R=jochen@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/19552004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213423 0039d316-1c4b-4281-b951-d872f2087c98
Add an option in DEPS files to clone a project into a temp dir
and then copy into expected final dir. This allows checking out a
git repo into a folder which is non-empty. It is useful for projects
that are embedded in src/ but want to specify the revision of
src/ in the embedded project (such as android private).
BUG=165280
Review URL: https://chromiumcodereview.appspot.com/19359002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@212720 0039d316-1c4b-4281-b951-d872f2087c98
We can use this to evaluate the usefulness of making hooks run in parallel.
Review URL: https://chromiumcodereview.appspot.com/18851005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@211446 0039d316-1c4b-4281-b951-d872f2087c98
Sometimes we wish to pull in a complicated dependency but want to
suppress or replace one or more of the hooks rules. Say for example
we want to use a different way of generating the projects, or
have a different set of landmine expectations.
Here we add a custom_hooks section mirroring custom_deps to allow us to
override sections we have identified in the DEPS file. To do so,
we add an optional name to the elements of the hooks list, and overwrite
those whose name matches.
Conventions between included DEPS and the .gclient as to the meanings of the
name are equivalent to the meaning of the customized deps, and so do not
benefit from further structure or definition.
BUG=None
TEST=local unit test
Review URL: https://chromiumcodereview.appspot.com/17742004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210573 0039d316-1c4b-4281-b951-d872f2087c98
--no-pager looks ugly in logs and output and makes commands harder to
read. Setting an environment variable is better.
This is a followup to https://chromiumcodereview.appspot.com/14104005/
which added --no-pager.
Review URL: https://chromiumcodereview.appspot.com/18173003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210503 0039d316-1c4b-4281-b951-d872f2087c98
Instead of cloning straight into place, clones are made to a global cache dir,
and then local (using --shared) clones are made from the cache to the final
resting place. This means the 'final' clones are full repos with no shenanigans,
meaning that branches, commits, etc. all work, which should allow the rest of
the gclient ecosystem to work without change as well.
The primary benefit is, of course, reduced network IO, and a much lower cost for
'clobber' operations (assuming we don't clobber the cache). It also means that
a given bot can have a greater number of checkouts, since the entire git history
will only be stored once per machine, instead of once per checkout.
R=dpranke@chromium.org, szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/18328003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210024 0039d316-1c4b-4281-b951-d872f2087c98
This will be used on the bots when calling apply_patch, which commits to git
repos.
R=dpranke@chromium.org,szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/18006002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@209040 0039d316-1c4b-4281-b951-d872f2087c98
Previously if one or both of these values were unset, the tests would simply fail
because `git config` returns 1.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/18053009
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@208966 0039d316-1c4b-4281-b951-d872f2087c98
It appears to be parsed and ignored, seems like a bug to me.
BUG=None
TEST=local/manual.
Review URL: https://chromiumcodereview.appspot.com/17265012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@207404 0039d316-1c4b-4281-b951-d872f2087c98
Greatly improves presubmit performance on Blink where there may be rule violations (my test case went from 50s to 5s).
BUG=236206
TEST=new test in presubmit_unittest.py; manual performance test on Mac and Windows after touching hundreds of files in webkit; testing included add/move/edit/delete on both binary and text files.
Review URL: https://chromiumcodereview.appspot.com/15898005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205275 0039d316-1c4b-4281-b951-d872f2087c98
When a developer runs download_from_google_storage, and they don't have a .boto
file, the tool automatically runs "gsutil config" to create one for them.
Unfortunately, a side consequence is that if a bot runs the script, and it has
a boto file that 403's, then it would run "gsutil config" which moves the .boto
to .boto.bak, and creates an empty .boto file. This should not be the intended
action.
This CL changes so that "gsutil config" is not called, but instead just fails
with a message telling the dev to run that command.
TBR=maruel@chromium.org
Review URL: https://codereview.chromium.org/16072023
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203824 0039d316-1c4b-4281-b951-d872f2087c98
If ~/.gitconfig contains:
[diff]
renames = "true"
then git diff --name-status will produce output that confuses the parsing
in svm.GIT.CaptureStatus and git diff will produce output that confuses the
patch command on trybots. Passing --no-renames explicitly counteracts this.
Review URL: https://chromiumcodereview.appspot.com/16057018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203778 0039d316-1c4b-4281-b951-d872f2087c98
76 columns is fine for most patches but reverts will eat another
4 spaces in indentation. For the sake of revert clarity this reference
line is reduced to 72 columns.
Review URL: https://chromiumcodereview.appspot.com/16152005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203530 0039d316-1c4b-4281-b951-d872f2087c98
Adds an extra line to the default text description to help judge whether the
76 character recommended limit is being passed.
Review URL: https://chromiumcodereview.appspot.com/15670012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203314 0039d316-1c4b-4281-b951-d872f2087c98
Also adds msg to assertions to print current size of data written to stdout.
Review URL: https://chromiumcodereview.appspot.com/16058007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202863 0039d316-1c4b-4281-b951-d872f2087c98
As noticed in the TODO, raw_input (used by ask_for_data) works badly
on background threads. On my Windows it doesn't even print the prompt which
makes it hard to interact with it.
Better to just abort and tell the user of gclient how to proceed.
BUG=
Review URL: https://chromiumcodereview.appspot.com/15421005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201295 0039d316-1c4b-4281-b951-d872f2087c98
[1] *scm_test.py are deeply broken, svnadmin is missing for svn_bin\.
And the git test are failing at shutdown.
Also Fix SvnCheckout.testMove flakiness.
TBR=ilevy@chromium.org,szager@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/14729012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198900 0039d316-1c4b-4281-b951-d872f2087c98
Helps scanning faster. colorma is already slightly used by gclient but wasn't
by git-cl yet.
Update a unit test to be stricter, it was caught in the cross fire as colorma
hooks sys.stdout and stderr.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/15025003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198689 0039d316-1c4b-4281-b951-d872f2087c98
SVN traps SIGINT and attempts to clean itself up, but this results in hangs
waiting for TCP. This patch does two things: daemonizes worker threads so they
are culled when the main thread dies (is ctrl-C'd) and keeps track of spawned
subprocesses to kill any remaining ones when the main program is ctrl-C'd.
A user ctrl-C'ing gclient has to manually terminate hung SVN processes, so this
introduces no extra data loss or hazard. stracing a hung SVN process shows that
it is indeed hanging on TCP reads after receiving a SIGINT, implying there is an
underlying but in the SVN binary.
Review URL: https://chromiumcodereview.appspot.com/14759006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198205 0039d316-1c4b-4281-b951-d872f2087c98
It is somewhat surprising when git-cl, which acts as a git subcommand, launches
a different editor. In particular, git has a config option (core.editor) which
specifies the editor that should be used. Since we already respect $GIT_EDITOR,
it makes sense for git-cl to respect core.editor and $VISUAL as well.
R=maruel@chromium.org
BUG=237504
Review URL: https://chromiumcodereview.appspot.com/14854003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198101 0039d316-1c4b-4281-b951-d872f2087c98
This makes the commit logs much more useful for a build sheriff. Not only he
sees who committed the CL but see who approved it directly at the log. This
should help build sheriffs when they fail to contact the author and want to
fallback on the reviewer for quick questions.
R=dpranke@chromium.org
BUG=76730
Review URL: https://chromiumcodereview.appspot.com/13800021
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196786 0039d316-1c4b-4281-b951-d872f2087c98
The 'RemoveDirectory()' function in gclient_utils is deprecated and
rmtree() should be used instead for consistency.
This patch modifies all clients in depot_tools to use rmtree() instead
and removes the RemoveDirectory function.
+ The SVNWrapperTestCase.testRevertNoDotSvn() mocking
expectation has been slightly changed. This was required
because the test invokes code that used to call
gclient_utils.RemoveDirectory() directly, while only
gclient_utils.rmtree() was mocked.
BUG=NONE
R=maruel@chromium.org, ilevy@chromium.org
TEST=manually run gclient_utils_test / gclient_smoketest / scm_unittest / gclient_scm_test
Review URL: https://chromiumcodereview.appspot.com/14134010
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196133 0039d316-1c4b-4281-b951-d872f2087c98
No other code changes, so should be no behavioral change.
Review URL: https://chromiumcodereview.appspot.com/14241038
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195262 0039d316-1c4b-4281-b951-d872f2087c98
Make it more consistent across the tool. Using \s also includes \n, which
confuses the tool.
Add more tests.
R=iannucci@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/14265007
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195214 0039d316-1c4b-4281-b951-d872f2087c98
This is needed because the current implementation commonly fails on Windows due to "directory not empty" errors. Using rd is more reliable.
Review URL: https://chromiumcodereview.appspot.com/13581005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194932 0039d316-1c4b-4281-b951-d872f2087c98
s/This will displayed/This will be displayed/g
BUG=
Review URL: https://chromiumcodereview.appspot.com/13811053
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194907 0039d316-1c4b-4281-b951-d872f2087c98
Here's some background why we need this:
We discovered that google code defines the timestamp of a revision to be the time when a commit was started
rather than when it was finished (apache subversion takes the timestamp when the commit transaction is finished).
This can result in a situation where revision R(i-1) has a higher timestamp than Ri.
See bug: https://code.google.com/p/support/issues/detail?id=30419
When using 'gclient --transitive' we effectively do date-based checkouts.
If a parent has a dependency (without a ...@revision) and that dependency lives in the same repository as the parent does
we'd like to checkout the exact same revision as the parent (if we do a date-based checkout as we do now the google code
bug can result in a situation where we don't get the same revision).
Review URL: https://chromiumcodereview.appspot.com/13814012
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194852 0039d316-1c4b-4281-b951-d872f2087c98
This will let clients that don't use the heavily filtered canned cpplint
check and want to behave more strictly (aka cc/) reuse any common
settings applied to the cpplint module.
R=maruel@chromium.org
BUG=none
Review URL: https://codereview.chromium.org/13866044
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194264 0039d316-1c4b-4281-b951-d872f2087c98
It was manually tested to work.
R=dpranke@chromium.org,iannucci@chromium.org
Review URL: https://codereview.chromium.org/13832005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194182 0039d316-1c4b-4281-b951-d872f2087c98
If no `--local` option is passed to git config command line tool, it will relies
on the local repository and then to the user configuration ($HOME/.gitconfig).
In case the user has - for some reason - a svn repository configured in this
user configuration, the checking: `git config --get-regexp ^svn-remote\.` will
accuse that there is svn repo and so the `git cl tool`. This patch just add
the option `--local` to the git config command line tool, avoiding this
situation.
R=maruel@chromium.org,dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13884014
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193987 0039d316-1c4b-4281-b951-d872f2087c98
I get the following when doing "gcl upload"
Traceback (most recent call last):
File "f:\src\depot_tools\gcl.py", line 1459, in <module>
sys.exit(main(sys.argv[1:]))
File "f:\src\depot_tools\gcl.py", line 1437, in main
return command(argv[1:])
File "f:\src\depot_tools\gcl.py", line 1070, in CMDchange
description = change_info.GetIssueDescription()
AttributeError: 'ChangeInfo' object has no attribute 'GetIssueDescription'
Sending crash report ...
args: ['f:\\src\\depot_tools\\gcl.py', 'change', 'w4f4']
cwd: f:\src\chrome3\src
exception: 'ChangeInfo' object has no attribute 'GetIssueDesc
host: JABDELMALEK3-W.ad.corp.google.com
stack: File "f:\src\depot_tools\gcl.py", line 1459, in
user: jabdelmalek
version: 2.6.2 (r262:71600, Apr 21 2009, 15:05:37) [MSC v.1
A stack trace has been sent to the maintainers.
"Make gcl use git_cl.py code for consistency in th..."
> Make gcl use git_cl.py code for consistency in the CL description formatting.
>
> This way, git_cl.py's ChangeDescription becomes the canonical CL description
> handler.
>
> R=dpranke@chromium.org
> BUG=
>
> Review URL: https://chromiumcodereview.appspot.com/13800018TBR=maruel@chromium.org
Review URL: https://codereview.chromium.org/14016004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193555 0039d316-1c4b-4281-b951-d872f2087c98
Include all the preparatory work to eventually update the R= line to match the
actual reviewers.
The goal here is that ChangeDescription becomes the official implementation for
handling and modifying commit messages accross git-cl, gcl and the commit queue.
This change does slightly tweak the spacing between the hot lines.
It is done on purpose to make them consistent.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/13741015
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193514 0039d316-1c4b-4281-b951-d872f2087c98
Blink wants to override the maxlen which is currently configurable in CheckLongLines but not in PanProjectChecks. This exposes the parameter on PanProjectChecks.
Review URL: https://chromiumcodereview.appspot.com/13403004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192394 0039d316-1c4b-4281-b951-d872f2087c98
PresubmitPromptOrNotify prints the message and prompts the user only
if the presubmit is on upload, not commit.
This is useful to provide upload-time sanity checks without blocking
the CL from being landed via the commit-queue.
Review URL: https://chromiumcodereview.appspot.com/12676031
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@190711 0039d316-1c4b-4281-b951-d872f2087c98
continuation of: https://codereview.chromium.org/11664024
Moved it from chrome/trunk/src/build to depot_tools/
BUG=153360
TEST=two unittests included in tests/
For end-to-end testing, check out a large directory. Run
find . -name .svn -prune -o -size +1000k -type f -print0 | upload_to_google_storage.py -b chrome-artifacts -0 -
(replacing chrome-artifacts with an upload-able bucket)
to test upload
run "find . -name .svn -prune -o -size +1000k -type f -print0 | xargs -0 rm" to remove the files uploaded. Check that the large binary files have been removed
run "download_from_google_storage.py -r -d -b chrome-artifacts ." to download the files again.
Review URL: https://chromiumcodereview.appspot.com/12042069
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187951 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
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
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
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
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 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
This version handles the case where we need to suggest two reviewers
who have overlapping sets of directories they can review.
R=maruel@chromium.org
BUG=76727
Review URL: https://chromiumcodereview.appspot.com/11639028
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@174216 0039d316-1c4b-4281-b951-d872f2087c98
It turns out that we were weighting all possible owners equally,
and picking the last one out of the list. Given the way we traversed
owners files, and given that we got rid of the "set noparent"s, this
meant that we were always suggesting Ben for just about everything.
This change implements a much smarter algorithm that attempts to balance
number of reviewers and closeness to the files under review. The unit
tests added show specific examples and explanations for why things are
chosen the way they are.
R=maruel@chromium.org
BUG=76727
Review URL: https://chromiumcodereview.appspot.com/11567052
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173784 0039d316-1c4b-4281-b951-d872f2087c98
If you were creating a new OWNERS file that only had per-file owners
in it (and no catch-all owners for the whole directory), then we
would not look for suggested owners in parent directories, and end up
suggesting nothing. See https://chromiumcodereview.appspot.com/11555036/
for the CL that revealed this.
Also, the unit tests were incorrectly using absolute paths in some cases,
making the code less predictable; I've fixed the unit tests and added
a check for this into owners.py (real changes never used absolute paths,
just paths relative to the checkout root).
R=maruel@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11569018
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173000 0039d316-1c4b-4281-b951-d872f2087c98
We use the fact the dcommit adds a "Committed:" link to the
description. If we wanted to be more strict, we could make
git cl dcommit post a comment on the CL (which would be nice
since it would notify reviewers that the CL was committed).
Note that this is untested as written, because it doesn't appear
that we have either git-cl integration tests, nor a test for
git cl dcommit adding the word "Committed:" so as written, this
presubmit check is prone to failure. Would like suggestions to
improve.
Also adding DoNotSubmit checks and a couple others to
PanPresubmitChecks.
R=maruel@chromium.org,dpranke@chromium.org
BUG=161702
Review URL: https://chromiumcodereview.appspot.com/11421050
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171158 0039d316-1c4b-4281-b951-d872f2087c98
This can come up when CQ closed an issue but the user's
local branch is still tied to the issue.
BUG=161702
Review URL: https://chromiumcodereview.appspot.com/11348122
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171153 0039d316-1c4b-4281-b951-d872f2087c98
settings.GetIsGerrit() would invoke logging.basicConfig() and
preemtps the basicConfig for verbose option in parser.parse_args.
R=maruel@chromium.org,ilevy@chromium.org
BUG=162600
Review URL: https://chromiumcodereview.appspot.com/11418171
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169843 0039d316-1c4b-4281-b951-d872f2087c98
- Many chrome-internal viewvc links do not support https. UpgradeToHttps
was added 10 months ago and continues to generate broken viewvc links.
Reverts part of crrev.com/9214004
BUG=107838
Review URL: https://chromiumcodereview.appspot.com/11412161
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169815 0039d316-1c4b-4281-b951-d872f2087c98
Multiple presubmit checks may call the same function multiple times, so it's
worth caching the results to speed up the presubmit check run.
Convert presubmit_support, git-cl and gcl to use it.
R=dpranke@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11280143
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@169726 0039d316-1c4b-4281-b951-d872f2087c98
Currently, if an unversioned directory is present where we would expect
a versioned repository to be, the following error is printed:
Can't update/checkout %s if an unversioned directory is present.
Delete the directory and try again.
If --reset and --delete_unversioned_trees are used, gclient should delete
the unversioned directory in this case.
This problem can be reproduced using the following recipe:
$ rm -rf src/third_party/webrtc/.svn
$ gclient sync -nRftD
BUG=none
TEST=Verify that above error is fixed. Run all smoke tests.
Review URL: https://chromiumcodereview.appspot.com/11366239
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167942 0039d316-1c4b-4281-b951-d872f2087c98
Added checks:
- Block upload of a diff from sha not in current branch
(this includes tracking against an unrebased local master)
- Block upload of a diff containing shas from origin/master
(should never happen)
- Use explicit calls to git merge-base instead of calling git diff
with "<branch>..." which implicitly uses merge-base.
BUG=157503
Review URL: https://chromiumcodereview.appspot.com/11262057
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165887 0039d316-1c4b-4281-b951-d872f2087c98
This allows specificying that a target OS list should override the base
list instead of adding to it. This is useful for iOS builds, where the
desired behavior is to pull only the iOS deps, not the union of the Mac
and iOS deps.
Review URL: https://chromiumcodereview.appspot.com/11363036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165671 0039d316-1c4b-4281-b951-d872f2087c98
This will let DEPS files specify a higher local bound for recursion.
Note there is an edge case where a dependency can be initially pulled
in with a lower recursion level and then gets ignored subsequently
when a lower level DEPS overrides it's inclusion level and then
includes the same dependency. I do not solve this case, as
I am intending to use this syntax for top level deps files.
BUG=155780
Review URL: https://chromiumcodereview.appspot.com/11146032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162464 0039d316-1c4b-4281-b951-d872f2087c98
- On high core, fast machines, jobs=8 is does not offer good
parallelization. Switch to use number of local cpus.
R=maruel@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/11140019
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162072 0039d316-1c4b-4281-b951-d872f2087c98
Nobody cares about those .orig files and they get in the way on the try server
for some specific license check.
R=cmp@chromium.org
BUG=152507
Review URL: https://chromiumcodereview.appspot.com/10983092
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159329 0039d316-1c4b-4281-b951-d872f2087c98
The try slaves run 'git revert' to clean up from the previous run. This only runs 'git reset --hard', which does not remove any untracked files, so if a CL adds a new file it will still be present after 'gclient revert'. Adding git clean -f -d removes untracked files (-f) and directories (-d).
Review URL: https://chromiumcodereview.appspot.com/10986032
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159020 0039d316-1c4b-4281-b951-d872f2087c98
For an unknown reason, 'svn propset svn:executable * foo.sh' doesn't work on
Windows. It is even more awkward that 'svn propset svn:executable . foo.sh'
works just fine, in particular, subversion replaces the value, as long as it's
not an empty string, back to '*'.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10967071
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158281 0039d316-1c4b-4281-b951-d872f2087c98
Add new test cases to verify it properly handles "-1 +1, 2" and "-1 +1" for
short files.
R=petermayo@chromium.org
BUG=
Review URL: https://chromiumcodereview.appspot.com/10894036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153906 0039d316-1c4b-4281-b951-d872f2087c98
I recently needed to run presubmit tests in depot_tools, and I was helpfully told:
$ gcl presubmit mychange
... eliding stuff ...
Install google_appengine sdk in /scratch/scratch/chrome/depot_tools_git/testing_support or higher up
This was a lie. If you put google_appengine there, the same presubmit
tools that told you to install it there will fail you for numerous
style violations contained within appengine itself. This change makes
us ignore those by blacklisting google_appengine inside of
testing_support.
Review URL: https://chromiumcodereview.appspot.com/10829293
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151210 0039d316-1c4b-4281-b951-d872f2087c98
Many, many times this has burned me badly; if you have a dirty index,
git try will just upload your commits, and not the index.
R=nsylvain@chromium.org
BUG=None
Review URL: https://chromiumcodereview.appspot.com/10836180
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@151202 0039d316-1c4b-4281-b951-d872f2087c98
Using urllib for SSL connections when behind a proxy is known to be
broken.
Upstream has fixed this in urllib2 in Python 2.6.3 and newer so
replace uses of urllib for SSL connections with urllib2 methods.
R=maruel@chromium.org
BUG=134165
TEST=gclient sync behind corporate proxy. Submitting this CL with git_cl.
Review URL: https://chromiumcodereview.appspot.com/10825107
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@149742 0039d316-1c4b-4281-b951-d872f2087c98
In some enviroments (eg, OSX zh_CN), use 'svn --version' and splitting string
may get error version string. Use 'svn --version --quiet' to do stable svn
version check, which directly returns version string such as '1.7.0'.
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10805037
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147670 0039d316-1c4b-4281-b951-d872f2087c98
git cl dcommit statistics were not using --find-copies-harder, scaring the user
off.
R=cmp@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10795003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@147343 0039d316-1c4b-4281-b951-d872f2087c98
Otherwise, the files are opened in 'whatever happens to be the current encoding'
which is highly system-dependent. Even if some files are not encoded with utf-8,
the status quo is even worse. So it's worth trying out.
TBR=cmp@chromium.org
BUG=
TEST=
Review URL: https://chromiumcodereview.appspot.com/10697036
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145306 0039d316-1c4b-4281-b951-d872f2087c98