Commit Graph

219 Commits (36c8b94904363aa46511f5535821241fcdcb12fc)

Author SHA1 Message Date
maruel@chromium.org baa7be383a Move mutation in run() at the end.
Also, add more locking to properties.

Now most mutations are contained. Will now figure out a way to remove the
ParseDepsFile() from an unrelated thread.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8142030

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104778 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0bcfd18035 Move all mutations into a specific place.
This makes coherency checks more consistent for DEPS vs .gclient.

It's still not thread safe but the mutation code paths are easier to follow.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8135019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104772 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org a91d26de47 Force requirements modification to be locked.
... On my quest to make that stuff thread safe.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8135008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104033 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1333cb3edb Improve logging and ease debugging.
While trying to fix all the multithreading issues...

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8135007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104026 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8c0d95826a Move more immutable members to DependencySettings.
Helps figuring out what is mutable and what is not.
The goal is to shorten the class Dependency to reduce places where mutations can occur.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8122005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103782 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ad3287e8da Move yield_full_tree() in its own member function.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8114005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103757 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4a271d52c4 Skip non existing directory in gclient recurse
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8094008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103525 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 064186cfb9 Dependency.url is also immutable. Convert more member as properties.
Merge _FindDependencies() back into __init__() now that __init__() is somewhat smaller.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8059011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103053 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 4bdd5fd5ae Move dependencies to a (to be) locked property.
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7982005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102777 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8ac2b27f3b Split static data from logic.
First, it reduces the class size, which is too large at the moment.
Second, it makes clear what is 'static' for the livetime of the instance life.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/8038015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102766 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f13a418654 Move more members as property
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7983052

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102211 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
cmp@chromium.org eb2756dfc4 Add a --unmanaged flag to gclient config to allow the main solution to be unmanaged by the scm.
The dependencies will continue to be managed. A new flag is present in the .gclient file to control this behavior.

Review URL: http://codereview.chromium.org/7918027

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6898897529 Continue conversion to more properties.
Make Dependency.file_list a tuple so it can't be modified.
Move the guesswork of file_list at the right place.
Remove tree() since it's unnecessary.

R=dpranke@chromium.org
BUG=
TEST=all smoke tests still pass


Review URL: http://codereview.chromium.org/7922011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101951 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org d6db3d5398 Use properties for more members that do not change
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7889047

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101950 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6ca8bf80b4 Retry "Initial step into making Dependency thread safe""
I had forgot one access to _requirements. Now that tests are run, this change is
safer to commit.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7909012

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101856 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3c74bc9df5 Fix member lookup to be more stable.
Add regression test.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7891061

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101351 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org adcf5b702d Revert "Initial step into making Dependency thread safe"
Broke the tree. :(

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101136 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 89d51c245c Initial step into making Dependency thread safe
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7892034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101135 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8fbb77614d Revert to --jobs 1 again.
I need to add real thread locking to some Dependency methods. That was long
needed anyway.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7891053

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101100 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8b36594b47 Sets --jobs 8 as the default.
I've fixed the From() issue that was causing it to hangs. We'll see if anything
pops up again.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7885028

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101084 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 485dcab61e Fix the case where a dep not processed could be set as a requirement.
This would result in a hang during gclient sync.

Includes regression test.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7885008

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101070 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 1ba646fccc Remove gclient_utils.Popen() usage from gclient.py
R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7795061

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100173 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ad9c97b6c2 Revert r100162 "Change default --jobs value from 1 to 4.""
One day it'll work. It still breaks webkit.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7850021

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100168 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 442ab8fcb2 Reapply r99735 "Change default --jobs value from 1 to 4."
It should be fine now that requirements with /@ works fine.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7782034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100162 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 98023dfb35 Urls with /@ won't be processed correctly when used as a requirements.
This is important for parallel checkout.

R=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7840033

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99981 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 3187f70542 Revert r99735 "Change default --jobs value from 1 to 4."
It breaks upstream webkit and nacl. I'll make then both use --jobs 1 before
relanding.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7833051

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99761 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org ee118f98d6 Change default --jobs value from 1 to 4.
It is now safe to use.

TBR=dpranke@chromium.org
BUG=
TEST=


Review URL: http://codereview.chromium.org/7779023

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99735 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 118fb1cdcb Fix parallelization of multiple solutions once for all.
Verify correctness with a unit test written explicitly to verify all corner cases.

BUG=60725
TEST=new unit test

Review URL: http://codereview.chromium.org/6598087

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@99234 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 0895b75236 Move the parser creation code in its own function to enable unit testing.
Unit test follow in next CL.

R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/7766005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@98480 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 26dd22b8ca GTTF: make gclient config overwrite the .gclient file if it exists
This prevents bots waiting 20 minutes and failing the update step.
Review URL: http://codereview.chromium.org/7492019

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@93678 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
bauerb@chromium.org 2aad1b262d Add --merge option to gclient sync.
BUG=none
TEST=

Review URL: http://codereview.chromium.org/7277035

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@93611 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 244e344739 Add linux3 support.
'Cause linux2 is so last decade.

TBR=evan@chromium.org
BUG=85845
TEST=

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@88788 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@google.com 12649efc71 Modify "gclient config url" to act a little bit more like "git clone url". If the
url is pointing to a git repo, the name of the directory created on disk will not
contain the .git suffix.
Review URL: http://codereview.chromium.org/7104009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87492 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
nsylvain@google.com efc8093168 Add a --deps-file flag to gclient to allow using a deps file other than DEPS.
TEST=covered by gclient_smoketest.py
Review URL: http://codereview.chromium.org/7062029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@87367 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 6e043f755b Remove unmaintained "gclient export" command,
introduced in http://src.chromium.org/viewvc/chrome?view=rev&revision=20990

It was intended for the tarball generation script,
but there was a better and simpler way.

BUG=80549
Review URL: http://codereview.chromium.org/6883263

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83708 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
floitsch@google.com eaab784bcf Add --transitive flag.
When specifying a revision (with -r) propagates the date of the revision to its children.

Review URL: http://codereview.chromium.org/6873110

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@83313 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 31cb48a436 First pass to transition away for gclient_utils.Error and gclient_utils.CheckedCallError.
Make sure every site that catches gclient_utils.Error also catch
subprocess2.CalledProcessError.

BUG=
TEST=

Review URL: http://codereview.chromium.org/6691034

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80339 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 725f1c3b69 Add a warning if the current version of python is not 2.5
R=dpranke@chromium.org
BUG=
TEST=

Review URL: http://codereview.chromium.org/6791018

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@80212 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 35625c7e56 Fix locale.getlocale() exception.
Reapply r79006 with fixes for ubuntu 10.4.

The only change is in fix_default_encoding() to trap an exception
locale.getlocale() may throw.

R=dpranke@chromium.org
BUG=none
TEST=unit test

Review URL: http://codereview.chromium.org/6721029

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79144 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org f946b22f96 Revert r79006: "Add code to 'fix' python encoding and it's unit test."
It is causing exception for some users on ubuntu 10.4 with:
"category LC_ALL is not supported"

TBR=dpranke

Review URL: http://codereview.chromium.org/6717025

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79012 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 8e741d3bb1 Add code to 'fix' python encoding and it's unit test.
With this code in action, I can successfully print arabic and chinese on linux
and cygwin. It fails to print chinese on my Mac but prints arabic. It prints '?'
on Windows console but it *doesn't throw* which is the biggest improvement here.
It was particularly a problem on windows because WindowsError's description text
is in the current ANSI code page so it failed to print if the text was not pure
ASCII, like error message when using Windows' French UI.

R=dpranke@chromium.org
BUG=none
TEST=manual unit test ./tests/fix_encoding_test.py and it shouldn't throw

Review URL: http://codereview.chromium.org/6676090

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@79006 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
thomasvl@chromium.org 9ea49d29da When listing things for pruning, include anything that has an override dependency of None.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6621043

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@77284 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c3a15a2381 Add an alert for python < 2.5.
Don't block execution.

Python 2.4 has been untested for a while and may break unexpectedly.

TEST=manual testing
BUG=none

Review URL: http://codereview.chromium.org/5110009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@66870 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 28d14bd114 Improve help to be clearer about what --delete_unversioned_trees does.
Make -D -f combination more effective by deleting directories even if there is
modified files.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/4803001

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@65845 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
joi@chromium.org 792ea881c7 Do not check the safesync_url at all if one or more --revision flags are
specified.

BUG=49625
TEST=tests\gclient_smoketest.py runs successfully


Review URL: http://codereview.chromium.org/4698006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@65620 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org b17b55beca Disable the remaining pylint warnings locally and enable pylint warnings in PRESUBMIT.
This causes some code clutter.

TEST=Increased pylint warning level
BUG=none

Review URL: http://codereview.chromium.org/4321006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64913 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org cb2985fb69 Largely reduce the number of pylint warnings and fix one typo.
Most of them are style issues or variable aliasing.

TEST=Can almost enable pylint warnings
BUG=none

Review URL: http://codereview.chromium.org/4360002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64908 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 463042941a Fix custom_deps, hooks and custom_vars to be evaluated even if no DEPS file.
Previously, solution's properties would be ignored if there was no DEPS file in
source control. Change the behavior to evaluate the properties anyway.

TEST=new smoke test
BUG=none

Review URL: http://codereview.chromium.org/4154004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@64232 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 45e9f2d2f8 Return a meaningful error message when no arg is given to gclient recurse.
It's better than throwing an exception.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/3779010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62921 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 78cba52586 gclient recurse fails if .gclient_entries doesn't exist.
Prints a meaningful message instead of throwing an exception.

TEST=none
BUG=none

Review URL: http://codereview.chromium.org/3828010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@62920 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago