Commit Graph

654 Commits (3294f52e76a5fd39e3cc5144c423ef61533544a3)
 

Author SHA1 Message Date
maruel@chromium.org 3294f52e76 Make --reset more powerful for svn checkouts
That makes --force less necessary.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56581 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6133c5b604 Improve the retry algorithm to be much more liberal.
BUG=chromium-os:5305
TEST=gclient sync should be much more resistent

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56565 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 945405e8b4 Add flushing to gclient revert.
Otherwise, if someone flush svn:ignore in src/third_part by error and that
causes a lot of files to be deleted, buildbot may hang while waiting for output.

BUG=Previous behavior killed the win try slaves.
TEST=smoke tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56541 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8e0e926332 Improve -m to be more efficient, only lookup the current rev if it is pinned.
Use svn up --force if -m or -f is used.
Renamed AddAdditionalFlags to _AddAdditionalUpdateFlags to be clearer about its purpose.
Strings cleanup.

With this change, it becomes more manageable to use -m on the continuous build.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56394 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org c41c27c86e Force LANGUAGE=en to fix svn output parsing
TEST=Run with LANGUAGE=fr_CA, gclient still works.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56354 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 399318ec99 Fix gclient_utils_test and disable gclient_scm_test.
gclient_scm_test is really flaky and is a pain to maintain. gclient_scm.py
coverage is good enough with gclient_smokte_test.

TBR=chase

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56351 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
chase@chromium.org 8ad1cee657 Flush more often in gclient's SubprocessCallAndFilter.
Speed up flushing of output on platforms that may not
flush as often as we expect (like Windows).  Wait at
least 10s between flushes to avoid overloading busy
readers.

BUG=none
TEST=gclient flushes on Windows more often, regular
gclient operations continue to work as expected
Review URL: http://codereview.chromium.org/3140013

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56217 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0380707ce2 Remove 'options' usage from scm.py
This is towards cleaning up the mess with 'options' in gclient_scm.py.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56213 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org c8d064b447 Add back stack location to gclient exceptions.
Needed to use the special 3 args raise notation.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56209 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 31485690ac Update upload.py to r552
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56208 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 9e5317ac38 Add --jobs support to gclient. --jobs=1 is still the default for now.
Huge thanks to piman@ for working on a patch. I chose a different design but he
gave me motivation and ideas. Sorry for not accepting his patch earlier, this
was mostly due to broken gclient implementation itself.

gclient can now run an unlimited number of parallel checkouts and always keep
the checkout coherency correct.

--jobs=1 is single threaded as before, albeit with a different code path.

Issues:
- Using --jobs with a value other than 1 will result in a mangled output.
- Exceptions thrown in a thread will be have the wrong stack trace.

TEST=gclient sync -j 99 in a ssh:// chromiumos checkout is dramatically faster.

---

Here's the perf on linux on i7-860 for a chromium checkout with warm cache. Cold
cache will result is significantly reduced improvements so this is best case
improvements. The sync was no-op all the time except where noted. All execution
where with "time gclient sync " + args. Didn't include 'sys' column since it was
statistically insignifiant and highly correlated with 'user'.

           runs with -f        runs with -m      without -f nor -m
 args          real    user      real    user      real    user
 -j 12       20.59s  18.00s     5.64s   7.95s     5.86s   8.10s
        #1 1m05.26s  20.02s     5.20s   7.94s     5.10s   8.09s
             22.79s  18.17s
 -j 1   #2 1m47.00s  16.72s     9.69s   5.72s    12.35s   5.96s
           1m31.28s  17.06s     9.54s   5.85s    10.51s   6.20s
           1m31.79s  16.39s
 before #3 1m30.94s  16.74s     9.77s   5.83s    10.45s   5.77s
           1m30.17s  17.30s    10.36s   5.68s    10.16s   5.88s
 hook #4      8.52s  7.93s
              8.73s  8.13s

#1 This particular run synched to r56023, a webkit roll updating layout tests.
   It's still faster than a no-op sync without parallel checkout.
#2 Maybe there was a sync or computer hickup, I didn't realize.
#3 This is depot_tools@56020
#4 Since -f implies runhooks, I ran the hook 'python src/build/gyp_chromium'
   manually to compare. Hooks are still run in a single thread. I didn't rest
   'gclient runhooks'.

I tried to go a ssh:// checkout of chromium os tree but it timed out everytime I
tried to sync so I couldn't get data points. I expect an order of magnitude of
improvement or more.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56079 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 80cbe8b7d1 Move ExecutionQueue and WorkItem to gclient_utils.py
Review URL: http://codereview.chromium.org/3107009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@56020 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org ce46489487 Remove semicolons from revinfo.
I've never known why there were added in the first place

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55896 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f50907b9d1 Fix duplicate Dependency that appeared by switching from a flat list to a tree.
Instead of keeping the reference information in the parent, note for each Dependency if it should be processed with self.should_process. I had to hack a bit with the hooks to also enforce recursion_limit() to keep the old behavior, otherwise From() could cause hooks to run that weren't run before.

BUG=50015
TEST=hooks are run properly. Tested with webkit and pagespeed and buildbot master, fixes running the same checkout multiple times.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55895 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 049bcedffe Add new class ExecutionQueue to take care of out-of-order execution.
ExecutionQueue takes care of reordering execution depending on each Dependency
requirements. There is no need to sort anymore.

ExecutionQueue also manages the Progress instance and is multithread safe, in preparation to parallel checkout.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55882 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
scottz@google.com 05d5a80a2e Modify repo to use http instead of git, some of or slaves cannot communicate over git
Review URL: http://codereview.chromium.org/3173006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55778 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org b1e315f9e8 Add revinfo --actual to fetch the actual revisions,
gclient revinfo alone will now not return the actual checked out revisions but simply what's in the .gclient&DEPS.

BUG=none
TEST=add a --snapshot test to make sure it is not broken

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55760 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 888b8355ca Add gclient_smoketest.py to PRESUBMIT.py check
It raises the time to run the presubmit to ~30 seconds but it's still worth.

TEST=run more often

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55759 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 6da25d0d81 A small refactor I had lying around for a while.
No functional change.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55745 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
tfarina@chromium.org 07dbca66e2 depot_tools: Add .html and .css to git-gs.
BUG=None
TEST=None

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55716 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 621939b680 Add Dependency.requirements which will solve the issues found in pagespeed and parallel checkout.
Review URL: http://codereview.chromium.org/3159002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55614 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org dde32eecf5 Improve logging and exceptions.
No functional change.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55581 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org f3abb80ae0 Fix the type of 2 exceptions.
Add Dependency.processed and .hooks_ran to ease debugging.

Accept when more than one reference exist for FromImpl(), it may happen as it is the case for pagespeed.

Not much behavior change.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55575 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org da7a1f902a Fix logic error in LateOverride().
It would modify self.parsed_url even when it's called for a From() keyword

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55574 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 86f0f95e37 Ignore unversioned files when switching a repository.
Review URL: http://codereview.chromium.org/3132004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55573 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 0d81244c42 Remove default arguments to Dependency.__init__().
Also rename an argument to better fit reality.

No functional change

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55559 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org e407c9ae28 Add code to automatically svn cleanup during svn update.
BUG=36135
TEST=gclient sync on a svn lock'ed directory will work automatically

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55438 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 862ff8ef8d Use # instead of - for the git hash so it can be filtered out by the try server
Review URL: http://codereview.chromium.org/3007040

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@55225 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 8b7f1e7bce Update upload.py from http://rietveld.googlecode.com/svn/trunk/upload.py at r546
TEST=none
BUG=none
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@54899 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
jochen@chromium.org ea85743f57 Fix unit tests not to choke on the no-try info message.
BUG=none
TEST=gcl_unittest

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@54442 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
jochen@chromium.org ebd0b54500 Only warn if the local working copy is dirty.
That change allows for merging multiple revisions into a local working copy.

TEST=none
BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@54399 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
rdsmith@google.com d05e5fb09f 'git try': a) Give users help when they ask for it, b) Don't start try job if you don't understand the command.
BUG=none
TEST=Make change in local sandbox and confirm proper things happen on "git try help", "git try xyzzy", and "git try -b linux."

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@54374 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
tfarina@chromium.org a44ff7ee09 depot_tools: Add .js to git-gs.
BUG=None
TEST=None

Signed-off-by: Thiago Farina <tfarina@chromium.org>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53938 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
sky@chromium.org 022879521d Changes gcl upload to print a reminder that it doesn't do a try.
Review URL: http://codereview.chromium.org/3046011

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53537 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org defec8e689 Disable the duplicate dependency check to get pagespeed back to sync.
BUG=50015
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53435 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 861fd0feb1 Make file_list recursive so that pattern in hooks will trigger on dependencies too.
This was the behavior before the refactor.

TEST=sync parfait and hooks should be run when necessary.
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53430 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
bradnelson@google.com 5f8f2a8402 Reverting 53377, horks webkit waterfall.
BUG=None
TEST=None
TBR=maruel

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53419 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org fe047ec5fa gclient: make repo executable
Review URL: http://codereview.chromium.org/3038015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53400 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 044f4e3998 Fix misalignment
NO CODE CHANGE.

TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53399 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 98d05fa37e Fix a bug with From('..', None) not working.
This issue is exhibited by pagespeed.

Also a solution is always a direct dependency by definition.

TEST=none
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53397 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org c57e4f2848 Make Dependency.subtree() a standalone function for later use.
No behavior change.

TEST=all test still pass
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53392 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org bc2d2f908b Fix docstring to be a docstring.
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53386 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org 85c2a19833 Add comments to clarify the purpose of some member variables.
NO CODE CHANGE.

TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53382 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org bffb9042d6 Add Dependency.hierarchy() to better visualize the origin of a dependency.
TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53379 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org cefc9d9113 Don't sort dependencies by name anymore since it can be an issue for some kind of DEPS setup.
PageSpeed is an example of such ordering dependency.

TBR=bradnelson

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53377 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
maruel@chromium.org df2b31582f Reapply gclient.py refactor for the third time.
Bring some OOP and sanity to gclient.py.

- Changed the algorithm from breadth-first to depth-first.
- Added infinite recursion support.
- Fixed From() of From() dependency.
- Fixed cross solution custom deps aliasing.
- Removed support code for old .gclient_entries format.
- Removed IsGitCheckout() in favor for a direct check for .git presence.

TEST=all test pass

The main difference with r51760 is that new smoke tests have been added since which replicates how webkit checkouts with gclient.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53205 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 4a3bc28256 Revert "gclient: fetch only what's needed"
This reverts commit bca61a9de79d5a86454edecae5b00e581e9e6783.

This commit was broken

BUG=none
TEST=gclient sync actually updates

TBR=maruel

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53112 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
sky@chromium.org 8010f07d80 Changes drover not to pass in no_try as it's no longer needed.
Review URL: http://codereview.chromium.org/3025006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53100 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
msb@chromium.org 42ba8628d8 gclient: fetch only what's needed
To reduce server load, only fetch the ref we need.

This is a redo of: http://codereview.chromium.org/2856038

First upload was the original CL 2856038. Subsequent uploads
are my changes.

TEST=ran presubmit tests

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@53072 0039d316-1c4b-4281-b951-d872f2087c98
15 years ago
derat@chromium.org f3b6d25226 gclient: Revert r52941's changes to gclient_scm.py.
This looks like it broke syncing from git repos:

  File "/home/derat/local/depot_tools/gclient.py", line 1208, in <module>
    sys.exit(Main(sys.argv[1:]))
  File "/home/derat/local/depot_tools/gclient.py", line 1198, in Main
    return command(parser, argv[1:])
  File "/home/derat/local/depot_tools/gclient.py", line 1035, in CMDsync
    return client.RunOnDeps('update', args)
  File "/home/derat/local/depot_tools/gclient.py", line 621, in RunOnDeps
    scm.RunCommand(command, self._options, args, file_list)
  File "/home/derat/local/depot_tools/gclient_scm.py", line 115, in RunCommand
    return getattr(self, command)(options, args, file_list)
  File "/home/derat/local/depot_tools/gclient_scm.py", line 264, in update
    print_error=False)
  File "/home/derat/local/depot_tools/scm.py", line 84, in Capture
    return gclient_utils.CheckCall(c, in_directory, print_error)
  File "/home/derat/local/depot_tools/gclient_utils.py", line 58, in CheckCall
    raise CheckCallError(command, cwd, process.returncode, std_out, std_err)
gclient_utils.CheckCallError: (['git', 'fetch', 'origin', 'cc1c63d'],
'/usr/local/google/home/derat/chrome/src/third_party/cros', 128, '', "fatal:
Couldn't find remote ref cc1c63d\nfatal: The remote end hung up unexpectedly\n")

BUG=none
TEST=works again after the revert
Review URL: http://codereview.chromium.org/2888023

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