Commit Graph

813 Commits (1132f5f896e1efc5ff177bab377e34d5cd1a1ebd)

Author SHA1 Message Date
maruel@chromium.org 1ce8e665e7 Do not tell people to ask me for help. I won't help them.
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
11 years ago
wtc@chromium.org 2eefccaddb Handle the PrimeLint SSL read timeout better.
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
11 years ago
pgervais@chromium.org 87884cc015 Added --(de)activate-update options
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
11 years ago
binji@chromium.org c3d17dd54a git_cl.py: In the "status" command, add space after the branch name.
i.e. the output looks like:

   my-branch-name : https://codereview.chromium.org/1234567
  my-other-branch : https://codereview.chromium.org/8675309

This makes it possible to double-click the branch name to use it in a subsequent
command.

BUG=none
R=maruel@chromium.org

Review URL: https://codereview.chromium.org/118613003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241731 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org 5ca2762dea Allow PRESUBMIT.py files to have old and new-style trybot specifications (as long as each file is consistent).
BUG=278554

Review URL: https://codereview.chromium.org/74163002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@241590 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bratell@opera.com ed2b4fe59b Handle conflicting os deps better in gclient.
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
11 years ago
bratell@opera.com 0ee42a68c1 Avoid windows presubmit hang in gclient tests.
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
11 years ago
hinoka@chromium.org c6a2ee6930 Adds SSO auth to gsutil
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
11 years ago
maruel@chromium.org ffeb2f36d7 Print test duration in verbose mode.
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
11 years ago
erikchen@google.com 12816087e7 Allow obj-c import statements to be as long as necessary.
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
11 years ago
ukai@chromium.org 7044efcc7b GERRIT_PORT is no longer used in git_cl.py
BUG=maruel@chromium.org,szager@chromium.org

Review URL: https://codereview.chromium.org/90763004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237657 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
ukai@chromium.org 712d6105b3 Download commit-msg from gerrit-review.googlesource.com
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
11 years ago
maruel@chromium.org 1a60dca731 Fix unpinned version to track upstream.
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
11 years ago
scottmg@chromium.org ff7ea00a6e Silence common noisiness in download_from_google_storage
Seems overly verbose when run in "gclient runhooks".

R=iannucci@chromium.org, brettw@chromium.org

Review URL: https://codereview.chromium.org/58783002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@237120 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org c61894cc02 Add no_auth flag to skip auth checking for buckets that don't require it. Also fix tests
BUG=321254

Review URL: https://codereview.chromium.org/76583002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@236039 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org aa74cf65d0 Add git-number script to calculate generation numbers for commits.
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
11 years ago
iannucci@chromium.org 4731ec4426 Fix upstream.sh presubmit test for git 1.8.3+
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
11 years ago
stip@chromium.org 68e0419d2f Rework bot and test parsing to allow receipt of (bot, set(test)) specifications.
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
11 years ago
szager@chromium.org f2d7d6b518 Consolidate subprocess retry logic into gclient_utils.
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
12 years ago
borenet@google.com 2d1ee9ec79 Add support in gclient for pre-DEPS hooks
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
12 years ago
rmistry@google.com 11145db693 Return unicode commit hashes in checkout.GitCheckout.
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
12 years ago
tyoshino@chromium.org 99918abbe7 Ignore CC_LIST when private flag is specified.
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
12 years ago
scottmg@chromium.org f547c80c36 Delete nag_max and nag_timer
It's impossible to sync by default on Windows and has been since this was
added: https://www.google.com/search?q=chromium-dev+nag_max

Most recently: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/CEpATyu9udc

So, remove it. If someone needs it they can figure out a more targeted
implementation.

Keep --no-nag-max for backwards compat so that bot scripts won't fail out.
I'll remove it from bot scripts after this has baked a while, and then
come back and remove the option.

R=iannucci@chromium.org

Review URL: https://chromiumcodereview.appspot.com/24950002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225730 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 2702bcdec7 Add json output for gclient.
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
12 years ago
cyrille@nnamrak.org ef509e48b1 Added SafeRename to better handle problems with git processes locking directories.
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
12 years ago
ikarienator@chromium.org faf3fdf736 An interactive tool to help find owners covering current change list.
BUG=77248

Review URL: https://chromiumcodereview.appspot.com/12712002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224264 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 31b42c0192 Change the "Missing OWNERS" presubmit check to only suggest owners for missing files.
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
12 years ago
agable@chromium.org 42c2079a1e Fix R= line rewriter to handle TBRs well.
R=maruel@chromium.org, thakis@chromium.org
BUG=253589

Review URL: https://chromiumcodereview.appspot.com/23072039

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222801 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com c5118cb597 Catching for "No such process" in tear_down_git similar to tear_down_svn.
I cannot reproduce the test failures in https://chromiumcodereview.appspot.com/24047003/ but I figure there must be a good reason tear_down_svn had this check so adding it to tear_down_git.

Review URL: https://chromiumcodereview.appspot.com/23437029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222785 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com de71b4dc29 Temporarily disabling Git checkout tests.
Disabling due to the unrelated presubmit failures in https://chromiumcodereview.appspot.com/24047003/.

Review URL: https://chromiumcodereview.appspot.com/23619035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@222766 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
rmistry@google.com 3b5efdf64d Completing implementation of GitCheckout in depot_tools.
Tested with:
* Unit tests have been added and they work.
* I also tested end-to-end using a skiabot-test repository in https://skia.googlesource.com/ (it is hidden). CLs I tested with are:
** https://codereview.chromium.org/22797006/ : Add whitespace in file1
** https://codereview.chromium.org/22815013/ : Remove whitespace from file1
** https://codereview.chromium.org/22867025/ : Add new files in directories
** https://codereview.chromium.org/22901018/ : Edit file in directory and delete file in directory
** https://codereview.chromium.org/22918014/ : Add, Delete and Modify 3 files
** https://codereview.chromium.org/23360004/ : Add new files in new directories


Note:
* When committing GitCheckout uses the --author to specify the original author. The author flag takes in 'Firstname Lastname <email_addr>' but we do not know the Firstname and LastName of the original author, which is why the code here parses out the username from the email address and uses it.
  Eg: For email address xyz@example.com it passes in --author 'xyz <xyz@example.com>'
* An example of the changes required in a project to use GitCheckout instead of SvnCheckout is in https://codereview.chromium.org/22859063/


Created to fix the following feature requests-
https://code.google.com/p/chromium/issues/detail?id=261619 : Update the Chrome commit queue to push to src.git.
https://code.google.com/p/skia/issues/detail?id=1593 : Add Git support to the Commit Queue.

Review URL: https://chromiumcodereview.appspot.com/22794015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@221392 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 39c0b22fd3 Convert gclient to use subcommand.py
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
12 years ago
danakj@chromium.org c5965bae62 Change default ReportErrorFileAndLine to use filename:lineno format.
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
12 years ago
ilevy@chromium.org 8d1a14ffd3 Fix depot_tools tests external dependency
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
12 years ago
maruel@chromium.org 885f65199c Disable colors if not a tty.
Otherwise this breaks git cl unit tests.

Update references to 'git cl' in git cl smoke tests to $GIT_CL.

TBR=ilevy@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/20888002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@214019 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org d9c1b20095 Revert "Revert "Improve description layout. Improve coloring and add legend in help.""
This reverts commit c0594f37a1.

Because I reverted the wrong thing >_<

TBR=maruel@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/20199002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213551 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org c0594f37a1 Revert "Improve description layout. Improve coloring and add legend in help."
This reverts commit 44a82fa84b.

Broke git cl apply <issue>

TBR=maruel@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/20131006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@213545 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 44a82fa84b Improve description layout. Improve coloring and add legend in help.
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
12 years ago
ilevy@chromium.org 3534aa56f4 Allow gclient clone in non-empty directories
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
12 years ago
ilevy@chromium.org c28d377739 Print time of long running hook actions
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
12 years ago
petermayo@chromium.org e79161aa2d Add custom hooks.
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
12 years ago
bratell@opera.com 82b91cd1a8 Replace --no-pager with GIT_PAGER=cat
--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
12 years ago
iannucci@chromium.org e6ebb4efd6 Fix tests for nag_max=30.
Test breakage introduced by f10ffa9069.

TBR=joi@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/18603010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210220 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 53456aa2a9 Add a git cache for gclient sync operations.
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
12 years ago
iannucci@chromium.org d4fffee1c5 Add --upstream option to gclient to scrape git checkouts back to upstream state.
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
12 years ago
iannucci@chromium.org 2a070f3027 Fix git tests to work regardless of global gitconfig.
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
12 years ago
petermayo@chromium.org acb9ed7d8f Honor the --boto flag in download_from_google_storage.
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
12 years ago
nick@chromium.org ff526198c4 presubmit_support: Call git once per change, to get a diff for all files. Parse this result to generate per-file diffs, which go into a cache that's shared between the AffectedFile instances.
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
12 years ago
hinoka@google.com f9cc91d907 Change download_from_google_storage.py to not run gsutil config when receiving a 403
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
12 years ago
mcgrathr@chromium.org 9249f64cf4 Pass --no-renames to git diff
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
12 years ago
alancutter@chromium.org bd1073ebe6 Change to 72 column reference in git cl upload message
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
12 years ago
xusydoc@chromium.org 885a960ba2 Don't delete directories that have been superseded by a broader checkout.
BUG=237388

Review URL: https://chromiumcodereview.appspot.com/14583004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@203384 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
alancutter@chromium.org 63a4d7fce1 Add 76 column reference in git cl upload message
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
12 years ago
tyoshino@chromium.org c1737d0609 Add --private option to git_cl.py
TEST=tests/git_cl_test.py

Review URL: https://chromiumcodereview.appspot.com/15650014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@202865 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
tyoshino@chromium.org 15ece796fe Increase expectation on output of gclient for help and unknown command.
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
12 years ago
szager@chromium.org 41da24bfb6 Set default nag_timer=6, and make it disable-able.
BUG=242220

Review URL: https://codereview.chromium.org/15367008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201859 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
bratell@opera.com 18fa4542d8 Don't "hang" gclient if fast-forward is not possible.
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
12 years ago
maruel@chromium.org 4572a09102 Have Rietveld.get_description() consistently strip CR and whitespace.
This makes the commit description cleaner.

R=iannucci@chromium.org
BUG=

Review URL: https://chromiumcodereview.appspot.com/14061008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@199275 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 9717013017 Fix many (but not all[1]) depot_tools tests on Windows.
[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
12 years ago
maruel@chromium.org 2e23ce3ecb Add colors to git cl comments.
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
12 years ago
szager@chromium.org 12b07e7e55 Refactor nag functionality in to NagTimer class.
Add default 30 second nag timer to gclient subprocesses.

BUG=227537

Review URL: https://chromiumcodereview.appspot.com/14826003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@198207 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
xusydoc@chromium.org 2fd6c3fcb7 Kill subprocesses on KeyboardInterrupt.
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
12 years ago
jbroman@chromium.org 615a262dcb Make git-cl more accurately imitate git's editor selection process, and respect $VISUAL.
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
12 years ago
bratell@opera.com f267b0e55c Fix 236148: Avoid triggering a pager in internal git commands.
BUG=236148

Review URL: https://chromiumcodereview.appspot.com/14104005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197872 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org e0558e6502 Add nag_timer.
BUG=227537
R=maruel@chromium.org,cmp@chromium.org
NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/14798003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197790 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org b054ebc8f3 Don't discard stderr.
R=maruel@chromium.org
NOTRY=true

Review URL: https://codereview.chromium.org/14643009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@197419 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org e52678e0ed Update the R= line with the actual list of reviewers that approved the CL.
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
12 years ago
digit@chromium.org dc112ac587 Remove gclient_utils.RemoveDirectory().
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
12 years ago
ilevy@chromium.org bc11731a9e Add support for parallel presubmit unit testing.
Enable parallel tests on depot_tools.
On Z620 presubmit times: 3m -> 35s.

Review URL: https://codereview.chromium.org/14247012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195377 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
pkasting@chromium.org 917ea7fa26 Removes DiffItem, which was unused, and moves _DiffItemInternal below GenerateDiff, now its lone caller.
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
12 years ago
maruel@chromium.org c6f60e8906 Fix R= line handling when there is no value and improve presubmit TAG line regex
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
12 years ago
bauerb@chromium.org b3b5201bb6 Sort list of files that are missing OWNERS LGTM in presubmit check.
BUG=none

Review URL: https://chromiumcodereview.appspot.com/13852011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194983 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
borenet@google.com 6b4a2ab6ad Use rd on Windows in rmdir
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
12 years ago
janx@chromium.org 104b2db2a0 Add missing word "be" in CL description comments
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
12 years ago
kustermann@google.com a692e8f51f Changed the behaviour of '--transitive' in gclient.py to use revision instead of timestamp for identical repositories.
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
12 years ago
enne@chromium.org e72c5f519a Add cpplint to presubmit input_api
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
12 years ago
maruel@chromium.org 29ff7cd419 Reapply r193525 "Make gcl use git_cl.py code for consistency in the CL description formatting."
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
12 years ago
zimmerle@gmail.com 3cdcf56c58 Ensures that local git config is used while checking if it is a Git-svn repo.
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
12 years ago
jam@chromium.org 7d5cc1b424 Revert 193525
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/13800018

TBR=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
12 years ago
maruel@chromium.org 8a0afa0423 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/13800018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@193525 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
maruel@chromium.org 78936cbc80 Switch ChangeDescription usage to be stricter.
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
12 years ago
jamesr@chromium.org af27f462d4 Make maxlen configurable in PanProjectChecks
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
12 years ago
wez@chromium.org a6d011e8dc Add PresubmitPromptOrNotify helper.
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
12 years ago
rogerta@chromium.org caa1655dd6 Save the GIT hash of HEAD when uploading to rietveld.
Review URL: https://chromiumcodereview.appspot.com/12811006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@188807 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
hinoka@google.com 867e5b5377 Scripts to download files from google storage based on sha1 sums
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
12 years ago
iannucci@chromium.org 8a4a2bc611 Add skip_canned option to presubmit_support.
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
12 years ago
dpranke@chromium.org f6ddfa4ba0 Use author as determined from scm if we can not get it from rietveld
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
12 years ago
sbc@chromium.org 5e07e0608c git cl upload now diffs HEAD rather than working tree
BUG=179131
TEST=./tests/git_cl_test.py


Review URL: https://chromiumcodereview.appspot.com/12388027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@185366 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org dbf8b4edd4 Add a way to require approval from owners other than the author.
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
12 years ago
dpranke@chromium.org 6b1e3ee9e3 Change the OWNERS check to print files, not directories
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
12 years ago
iannucci@chromium.org 3830a67f5f Make safesync w/ git hash work when lkgr is ahead of clone.
R=maruel@chromium.org, szager@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/12301002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183275 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 1e7187a595 Make gclient_scm_test pass even if no global user name or email is defined.
R=maruel@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/12300002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183044 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 16b514092c Fix parameters for git_cl and gcl.
TBR=maruel@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/12300005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@183022 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 25a4ab4397 Add patchset number on manual commit comment.
R=cmp@chromium.org, maruel@chromium.org


Review URL: https://chromiumcodereview.appspot.com/12276007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@182861 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
torne@chromium.org 0ecad9c05d Presubmit tests: allow 200 columns in .mk files.
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
12 years ago
iannucci@chromium.org b85a316315 Make gcl commit/git cl dcommit append a commit notification to rietveld.
R=maruel@chromium.org
BUG=163426

Review URL: https://chromiumcodereview.appspot.com/12047089

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@178975 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 9d66f480c8 handle OWNERS suggestions where anyone can approve better.
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
12 years ago
ilevy@chromium.org 7b677f7a11 Fix RunPylint affected files regex issue
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
12 years ago
dpranke@chromium.org c591a700cc Try #3 to improve the owners suggesting algorithm.
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
12 years ago
dpranke@chromium.org 5e5d37bf09 Revert "Try again to land the improved owners algorithm." again :).
TBR=maruel@chromium.org

Review URL: https://codereview.chromium.org/11638019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173990 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 055a0dee07 Try again to land the improved owners algorithm.
Initially landed in r173784, reverted in r173808

R=maruel@chromium.org
BUG=76727


Review URL: https://chromiumcodereview.appspot.com/11645009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173979 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 13f24eb0a8 Revert "Rework the owner-suggesting algorithm."
TBR=maruel@chromium.org
BUG=

Review URL: https://codereview.chromium.org/11645008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173808 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org 1a54c22b73 Rework the owner-suggesting algorithm.
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
12 years ago
jam@chromium.org 1d3f02c716 Revert 171153 to add a presubmit check to check for closed issues.
BUG=161702

Review URL: https://chromiumcodereview.appspot.com/11566014

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@173104 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
dpranke@chromium.org b54a78ed9d Suggest owners for OWNERS files that only have per-file owners.
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
12 years ago
ilevy@chromium.org 6bf2b45c51 Remove committed check from depot_tools presubmit
BUG=161702

R=maruel@chromium.org


Review URL: https://chromiumcodereview.appspot.com/11438024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@171277 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org c50d761bca Add presubmit check for dcommitted / CQed CLs
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
12 years ago
ilevy@chromium.org 1fa5cb9ce3 Add presubmit check to verify issue is not closed.
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
12 years ago
dpranke@chromium.org d16e48b285 allow spaces on the per-file directives in OWNERS files
R=maruel@chromium.org
BUG=163030


Review URL: https://chromiumcodereview.appspot.com/11434048

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@170819 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ukai@chromium.org 8ef7ab251c Don't call settings.GetIsGerrit() before parser.parse_args()
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
12 years ago
ilevy@chromium.org a78f7c0271 Rollback UpgradeToHttps for viewvc links
- 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
12 years ago
maruel@chromium.org 4bac4b5517 Create CachingRietveld to automatically cache results for presubmit checks.
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
12 years ago
davidjames@chromium.org 13349e2d41 Remove more unversioned directories.
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
12 years ago
ilevy@chromium.org f2ed3fb1f0 Add gclient grep for git repos
- Adds a gclient grep command to search through git repos.

BUG=157950


Review URL: https://chromiumcodereview.appspot.com/11312116

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@167007 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
sivachandra@chromium.org a0ad8ad9c9 'dep_os' paths override 'deps' paths.
BUG=157979


Review URL: https://chromiumcodereview.appspot.com/11368067

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@166247 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
ilevy@chromium.org 0f58fa88ef git_cl sanity checks
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
12 years ago
stuartmorgan@chromium.org 18a4f6a798 Allow specificying that only target_os should be used in a gclient file
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
13 years ago
ukai@chromium.org 259e46891c git-cl: show dirty files if any
R=chase@chromium.org,szager@chromium.org,maruel@chromium.org
BUG=157398
Review URL: https://codereview.chromium.org/11262004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@164026 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org 91668b7007 Improve the test.
BUG=155792


Review URL: https://chromiumcodereview.appspot.com/11274037

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163975 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org d45e73e88b Allow DEPS file to specify 'target_os'.
BUG=155792


Review URL: https://chromiumcodereview.appspot.com/11246004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163955 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org aebe87f424 Add gerrit Change-Id to commit messages if they do not have one.
BUG=156729


Review URL: https://chromiumcodereview.appspot.com/11236013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163366 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dpranke@chromium.org e3b1c3d1e3 Fix swapping of args in call to relpath() that was causing
OWNERS checks on DEPS to fail.

TBR=maruel@chromium.org
BUG=157022



git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163192 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 7954005862 Allow users of git cl to disable git copy detection entirely.
Depends on rietveld cl: https://codereview.appspot.com/6726050/
BUG=155511

Review URL: https://chromiumcodereview.appspot.com/11195012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@163092 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dpranke@chromium.org 17cc244cdb implement per-file OWNERS support
R=maruel@chromium.org
BUG=119394


Review URL: https://chromiumcodereview.appspot.com/11114005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@162529 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
ilevy@chromium.org 27ca3a99b4 Add recursion=n syntax to DEPS files.
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
13 years ago
ilevy@chromium.org 1369150868 Make gclient sync use cpu count for default jobs
- 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
13 years ago
srdjan@google.com b531354fef Fix Issue 154553: gcl upload from within drover throws error
Adjust timeouts in PrimeLint.

BUG=154553

Review URL: https://chromiumcodereview.appspot.com/11122005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@161950 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org c51def3ff4 Restore previous behavior of GetSha1ForSvnRev, so unit tests pass.
Review URL: https://chromiumcodereview.appspot.com/11148019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@161909 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
sivachandra@chromium.org 270db5c246 Allow special java statements (for example imports) to be as long as neccessary.
BUG=152209


Review URL: https://chromiumcodereview.appspot.com/11043031

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@160956 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 53937ba767 Add option to specify similarity level for git diff operations on commandline
BUG=125983

Review URL: https://chromiumcodereview.appspot.com/10945002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159732 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 4dd9f7205a Make apply_issue.py much more verbose about what it's doing.
It's to help users figuring out what is happening.

TBR=rogerta@chromium.org
BUG=153284


Review URL: https://chromiumcodereview.appspot.com/11028002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@159504 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org ec4a918139 Add --no-backup-if-mismatch so no .orig file is created when fuzzing occurs.
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
13 years ago
lliabraa@chromium.org ade83db154 Add 'git clean -f -d' to 'gclient revert' when in a git repo.
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
13 years ago
maruel@chromium.org e1a0376aa1 Fix applying svn:executable on Windows.
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
13 years ago
maruel@chromium.org dffc73cb44 Fix applying git diff with new file mode 644 on a svn checkout.
svn propdel svn:executable shouldn't be called on it.

R=petermayo@chromium.org
BUG=150960


Review URL: https://chromiumcodereview.appspot.com/10962038

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@158038 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
jam@chromium.org 07d44398a2 Switch gcl/git upload to use https://codereview.chromium.org instead of https://chromiumcodereview.appspot.com. It's been a week since the SSL certificate got added, and the old DNS records had a TTL of 7 days.
Review URL: https://chromiumcodereview.appspot.com/10910225

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@156316 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
iannucci@chromium.org 1512ab681a Fix git_cl diffstat to use -l100000 to match upload.py
Enables git to correctly detect copies and renames simultaneously.

BUG=144408


Review URL: https://chromiumcodereview.appspot.com/10915190

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@155899 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 4c422e9b8c options.from_logs is not used anywhere since it's the default.
R=rogerta@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/10887035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@153976 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 17fa4beec4 Fix hunk handling for 'default hunk header values'.
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
13 years ago
maruel@chromium.org d254e84506 Fix depot_tools presubmit check for ubuntu 12.04.
R=cmp@chromium.org
BUG=


Review URL: https://chromiumcodereview.appspot.com/10828393

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@152752 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
gavinp@chromium.org 656326d43d Permit google app engine to be installed in testing_support.
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
13 years ago
gavinp@chromium.org affe7b8148 Make git try warn on a dirty index.
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
13 years ago
wittman@chromium.org 492a368f6d Fix error syncing to LKGR due to misparsing of Cygwin git-svn output.
BUG=138104
TEST=


Review URL: https://chromiumcodereview.appspot.com/10826035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@150952 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
joshua.lock@intel.com 426f69b485 Remove the use of urllib for SSL connections
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
13 years ago
jamesr@chromium.org 35d1a84d76 Remove autogeneration of TEST= and automated check
Review URL: https://chromiumcodereview.appspot.com/10827059

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@148672 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 995f8ac254 Remove GitSvn*Checkout implementations.
They were not used, causing unnecessary code bloat.

R=cmp@chromium.org
BUG=
TEST=


Review URL: https://chromiumcodereview.appspot.com/10825009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@148541 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
shouqun.liu@intel.com 13b522c1aa Fix the svn version check issue, append '--quiet' to get svn version string.
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
13 years ago
maruel@chromium.org 49e3d807fd Fix stats output to be always the same and coherent with what is committed.
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
13 years ago
dbeam@chromium.org 0f8a944d84 [depot_tools] Allow gclient runhooks to work offline w/safesync_url.
R=maruel@chromium.org
BUG=None (AFAIK)
TEST=Turn off networking, run gclient runhooks.

Review URL: https://chromiumcodereview.appspot.com/10750007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145878 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org dae209fb46 Enforce utf-8 codec on all files read and write.
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
13 years ago