Also - Turn on GC for the unrecognized repos.
BUG=skia:6241
TEST=local
git_cache.py populate with chromium and non-chromium repo.
Change-Id: I100d3665e317b29c5b3f69b49c165ce88cd019d6
Reviewed-on: https://chromium-review.googlesource.com/455979
Commit-Queue: Ryan Tseng <hinoka@chromium.org>
Reviewed-by: Aaron Gable <agable@chromium.org>
This affects a bunch of files, but only changes comments,
and shouldn't make any difference to behavior.
The purpose is to slightly improve readability of pylint
disable comments.
Change-Id: Ic6cd0f8de792b31d91c6125f6da2616450b30f11
Reviewed-on: https://chromium-review.googlesource.com/420412
Reviewed-by: Aaron Gable <agable@chromium.org>
Commit-Queue: Quinten Yearsley <qyearsley@chromium.org>
Currently, 'bot_update' uses the 'gclient' that is on the system path.
Now, it will use the 'gclient.py' that is in the same 'depot_tools'
checkout as the 'bot_update' recipe module.
Also don't ignore "git_cache" move errors.
BUG=664254,663990,663440
TEST=None
Review-Url: https://codereview.chromium.org/2492963002
gclient-sync + git-cache are racy because if two different DEPS files
dependent on the same repo URL, even if depsed to different checkout
dirs, they use same git cache dir. If both checkout dirs are synced at
the same time, one of them cannot acquire a lock.
This is a cheap solution to change --lock_timeout option default value
from 0 to 5m.
R=hinoka@chromium.org
BUG=593468
Review URL: https://codereview.chromium.org/1785083005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299386 0039d316-1c4b-4281-b951-d872f2087c98
I guess I'm the only developer using git-cache, which is sad.
Hopefully these fixes will make it easier to adapt this to developer
usage some time in the FUTURE.
BUG=583420
TEST=Works for me
R=agable@chromium.org,tandrii@chromium.org
Review URL: https://codereview.chromium.org/1650993005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298531 0039d316-1c4b-4281-b951-d872f2087c98
With this change, 'git cache fetch' will automatically re-bootstrap
a repo from google storage if the local cache has too many pack
files. The behavior can be disabled with the --no-bootstrap flag.
BUG=
Review URL: https://codereview.chromium.org/1320383004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296829 0039d316-1c4b-4281-b951-d872f2087c98
Based on yapf (https://github.com/google/yapf) this
formatter currently only works with --full. It defaults
to pep8 style and projects that use a different style
can add .style.yapf to the top level.
Review URL: https://codereview.chromium.org/1156743008
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295547 0039d316-1c4b-4281-b951-d872f2087c98
Handle KeyboardInterrupt gracefully rather the printing a
backtrace. Most users of these tools don't expect a
backtrace when then hit Ctrl-C.
Also, fix a few other inconsistencies found in the python
startup code of these different scripts:
- always call main function 'main' (rather than 'Main')
- always return 0 from main function
- if main takes args never include argv[0]
Review URL: https://codereview.chromium.org/955993006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294250 0039d316-1c4b-4281-b951-d872f2087c98
The root of problem is a _cache_temp file.
git_cache expected that it is a folder.
So rmtree failed to remove it.
BUG=
TBR= dpranke@chromium.org, enne@chromium.org
NOTRY=true
Review URL: https://codereview.chromium.org/825133002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293502 0039d316-1c4b-4281-b951-d872f2087c98
This pins gsutil to a vanilla 4.7 instead of the weird custom 3.4 we have in depot_tools
BUG=
R=pgervais@chromium.org
Review URL: https://codereview.chromium.org/797663003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293413 0039d316-1c4b-4281-b951-d872f2087c98
So the original intention of moving it to a different directory to be deleted later
was to (1) save it for diagnosis (2) be a single inode swap rather than a long
rmtree delete.
1. No one is actually looking at these directories
2. The tmpdir sometimes end up on a different partition, so it ends up being
a copy + delete instead. Since we're not getting timeouts from that, its
probably actually better to just straight up delete it.
BUG=410727
Review URL: https://codereview.chromium.org/538993002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291818 0039d316-1c4b-4281-b951-d872f2087c98
Seems like some combination of things (bad cache dir, shallow checkout, etc) causes
git cache to not clean up properly before trying to move new directory A into
already existing directory B.
So the logic is all there to detect that the cache is invalid, its just not
being cleaned up properly during shallow checkouts.
BUG=406864
TBR=iannucci
Review URL: https://codereview.chromium.org/499123002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291587 0039d316-1c4b-4281-b951-d872f2087c98
Some options have words separated by underscores. Added options with
same name and underscores replaced by hyphens.
BUG=400953
Review URL: https://codereview.chromium.org/436963005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@288366 0039d316-1c4b-4281-b951-d872f2087c98
If you're in a git checkout cloned from the git cache, this will:
- Update the cache with the latest upstream commits.
- Update the cwd with the latest commits from the cache.
For example:
> cd $HOME/workspace/chromium/src
> git cache fetch
R=agable@chromium.org,iannucci@chromium.org
BUG=
Review URL: https://codereview.chromium.org/440213005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@288140 0039d316-1c4b-4281-b951-d872f2087c98
Git cache sometimes fail on:
Traceback (most recent call last):
File "E:\b\depot_tools\\gclient.py", line 2064, in <module>
sys.exit(Main(sys.argv[1:]))
File "E:\b\depot_tools\\gclient.py", line 2052, in Main
return dispatcher.execute(OptionParser(), argv)
File "E:\b\depot_tools\subcommand.py", line 245, in execute
return command(parser, args[1:])
File "E:\b\depot_tools\\gclient.py", line 1830, in CMDsync
ret = client.RunOnDeps('update', args)
File "E:\b\depot_tools\\gclient.py", line 1342, in RunOnDeps
work_queue.flush(revision_overrides, command, args, options=self._options)
File "E:\b\depot_tools\gclient_utils.py", line 852, in flush
self._run_one_task(self.queued.pop(i), args, kwargs)
File "E:\b\depot_tools\gclient_utils.py", line 944, in _run_one_task
task_item.run(*args, **kwargs)
File "E:\b\depot_tools\\gclient.py", line 744, in run
file_list)
File "E:\b\depot_tools\gclient_scm.py", line 160, in RunCommand
return getattr(self, command)(options, args, file_list)
File "E:\b\depot_tools\gclient_scm.py", line 387, in update
self._UpdateMirror(mirror, options)
File "E:\b\depot_tools\gclient_scm.py", line 802, in _UpdateMirror
ignore_lock=options.ignore_locks)
File "E:\b\depot_tools\git_cache.py", line 409, in populate
os.rename(tempdir, self.mirror_path)
WindowsError: [Error 183] Cannot create a file when that file already exists
It would appear that its being racy, but otherwise it doesn't make any sense. A theory
is that this could be running twice and stepping on each other. Allowing this
to pass on OSError allows us to test this theory.
BUG=395333
Review URL: https://codereview.chromium.org/408653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@284272 0039d316-1c4b-4281-b951-d872f2087c98
We're seeing fetches fail in interesting ways:
running "git fetch -v --progress origin +refs/heads/*:refs/heads/*" in "/mnt/scratch0/b_used/build/slave/cache_dir/chrome--internal.googlesource.com-chrome-src--internal"
error: object file ./objects/a1/4bd89aa4cc7d7bbad7594cba0ae73e99dbb54c is empty
error: object file ./objects/a1/4bd89aa4cc7d7bbad7594cba0ae73e99dbb54c is empty
fatal: loose object a14bd89aa4cc7d7bbad7594cba0ae73e99dbb54c (stored in ./objects/a1/4bd89aa4cc7d7bbad7594cba0ae73e99dbb54c) is corrupt
fatal: The remote end hung up unexpectedly
And then the cache becomes corrupted. This blows the cache away if this happens.
BUG=261741
Review URL: https://codereview.chromium.org/352543003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@280123 0039d316-1c4b-4281-b951-d872f2087c98
Unfortunately, the locking mechanism is still flaky on Windows.
bot_update.py will use this, since we can be certain that there
won't be overlapping access to the cache.
R=hinoka@google.com, agable@chromium.org, hinoka@chromium.org
BUG=
Review URL: https://codereview.chromium.org/340953003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@278490 0039d316-1c4b-4281-b951-d872f2087c98
A number of bots have been running out of disk space because they
are accumulating temp dirs and temp pack files. Be more careful
to clean up temp dirs whenever UnlockAll() is called.
R=hinoka@chromium.org,agable@chromium.org
BUG=
Review URL: https://codereview.chromium.org/335253002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277812 0039d316-1c4b-4281-b951-d872f2087c98
When a git-cache operation is interrupted, it can leave behind large
temporary pack files. Over time, these pack files will fill up
disks.
R=agable@chromium.org,hinoka@chromium.org,iannucci@chromium.org
BUG=352268
Review URL: https://codereview.chromium.org/326203003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@276208 0039d316-1c4b-4281-b951-d872f2087c98
Last patch (https://codereview.chromium.org/313933005/) forgot to take into account using a boto file (setting boto to os.devnull
means connect unauthenticated, setting it to None will allow it to do the default
behavior)
This patch will always use a boto file, which should be fine.
BUG=261741
Review URL: https://codereview.chromium.org/314203002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@275230 0039d316-1c4b-4281-b951-d872f2087c98
This is need, e.g., to suppress logging message for 'exists'.
TBR=agable@chromium.org,hinoka@chromium.org
BUG=
Review URL: https://codereview.chromium.org/299163002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@272450 0039d316-1c4b-4281-b951-d872f2087c98
This is because the version of unzip on osx doesn't support zip64, so it can't
unzip large repositories like blink.
BUG=261741
Review URL: https://codereview.chromium.org/251413002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@266151 0039d316-1c4b-4281-b951-d872f2087c98
Sometimes, removing lockfiles fails on windows, for obscure reasons.
Following advice from gclient_utils.rmtree, lock file removal has
been improved by using the builtin executable 'del' and retrying 3
times in case it fails.
BUG=
Review URL: https://codereview.chromium.org/240653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264557 0039d316-1c4b-4281-b951-d872f2087c98
Evidence indicates that running non-builtin git commands is very
slow in msysgit, slow enough to dominate the running time of
gclient sync. With this change, gclient never shells out to
git-cache; it import the lib directly instead.
R=agable@chromium.org,hinoka@chromium.org
BUG=
Review URL: https://codereview.chromium.org/229653002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262759 0039d316-1c4b-4281-b951-d872f2087c98
This is based off the svn tarball bootstrap script in gclient_scm.py
Also included is a new command to create a new zarchive/zipball.
BUG=261741
Review URL: https://codereview.chromium.org/220423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@261002 0039d316-1c4b-4281-b951-d872f2087c98