Reason for revert:
Didn't help.
Original issue's description:
> gclient: kill git fetch operation that hangs.
>
> This provides env variable GCLIENT_KILL_GIT_FETCH_AFTER
> that kills git fetch if it produces no output for that
> many seconds.
>
> Note that this is not final patch, but an experiment.
> See http://crbug.com/635641#c24 for the deployment plan.
>
> BUG=635641
> R=hinoka@chromium.org
>
> Committed: f8757b7e02
TBR=hinoka@chromium.org,hinoka@google.com
# Not skipping CQ checks because original CL landed more than 1 days ago.
BUG=635641
Review-Url: https://codereview.chromium.org/2410853002
It might be the case for some repositories that there is no merge base
between the current git HEAD and origin/master, which causes git
merge-base to exit with a non-zero code and cause calls to gclient
status/diff/pack to fail, as well as gclient sync if the repository in
question has been removed from DEPS.
This is true for the external/webrtc/trunk/talk repository, for example.
Its recent release branches (branch-heads/45 all the way to /53 at
least) have no ancestry shared with its master branch, so gclient
sync'ing from a Chromium M51 checkout to an M52 one (where it's no
longer in DEPS) fails because of the failed git merge-base calls.
We now ignore failures and just don't specify a merge base when calling
"git diff".
BUG=633962
R=iannucci@chromium.org,agable@chromium.org,maruel@chromium.org
Review-Url: https://codereview.chromium.org/2215673002
BUG=591814
TEST=gclient sync prints the correct report locally
when config is wrong.
Review-Url: https://codereview.chromium.org/2018803002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300671 0039d316-1c4b-4281-b951-d872f2087c98
This reverts commit 3f0dacf095.
Reason for revert:
Is causing staged changes to be reverted.
BUG=607913
TBR=hinoka,dnj
Review URL: https://codereview.chromium.org/1983963002 .
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300598 0039d316-1c4b-4281-b951-d872f2087c98
Instead just do a git checkout --force, since there are some states that reset cannot fix.
BUG=606420
Review URL: https://codereview.chromium.org/1916973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@300176 0039d316-1c4b-4281-b951-d872f2087c98
This will clean up index.lock and refs/heads/master.lock-style locks when
invoked as part of the update_scripts step on the bots.
R=dpranke@chromium.org, estaab@chromium.org, pgervais@chromium.org
BUG=421769
Review URL: https://codereview.chromium.org/1862943002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@299737 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
Consider an SVN repo which was mirrored to git by git_updater. When SVN repo is migrated to github, the git histories of chromium mirror and new github one are different. As a result, hashes of the objects do not match.
Before, gclient would just get stuck at trying to fetch the repo after changing its remote url with errors like this:
...
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] error: refs/heads/master does not point to a valid object!
[0:01:21] error: refs/remotes/origin/HEAD does not point to a valid object!
[0:01:21] error: refs/remotes/origin/master does not point to a valid object!
[0:01:21] fatal: bad object HEAD
[0:01:21] error: /b/git-cache/chromium.googlesource.com-external-github.com-google-open--vcdiff did not send all necessary objects
The solution is to notice such state, delete the .git folder, and clone again.
BUG=523239
R=akuegel@chromium.org
Review URL: https://codereview.chromium.org/1303293002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296417 0039d316-1c4b-4281-b951-d872f2087c98
Also removed part of the message that encourages users to disable updates to
depot_tools. If the users do not enable updates, it prevents landing changes into
project repositories that depend on having latest version of the depot_tools, e.g.
https://codereview.chromium.org/1152823005/.
R=akuegel@chromium.org
TBR=maruel@chromium.org, iannucci@chromium.org
BUG=475320
Review URL: https://codereview.chromium.org/1162153004
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295486 0039d316-1c4b-4281-b951-d872f2087c98
Include links to the tracking bug and to request creating git repositories. Also
include note how to keep subversion support, if users require this.
It won't warn when git-svn clones are used.
There is no functional change except printing a warning to stderr.
Remove stale code. The CHROMIUM_SRC_URL variable is also defined in gclient.py
so it looks like a copy-paste error.
R=iannucci@chromium.org
BUG=475320
Review URL: https://codereview.chromium.org/1154173003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295478 0039d316-1c4b-4281-b951-d872f2087c98
crrev.com/348703002 has introduced some code into gclient_scm.py which
disables the .git/hooks when gclient is running in managed mode.
The disabling logic renames the individual hook files to hook.disabled
using os.rename. Conversely to what happen on Posix OSs, on Windows
os.rename does not have atomic rename semantics [1] and it fails if the
destination file already exists.
This change improves the hook disable logic.
[1] See https://bugs.python.org/issue8828 and os.replace in Python 3
BUG=474218
Review URL: https://codereview.chromium.org/1063973002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294715 0039d316-1c4b-4281-b951-d872f2087c98
This adds the '--auto_rebase' sync option, enabling parallel updates to
automatically rebase local Git branches during sync.
BUG=None
TEST=local
Review URL: https://codereview.chromium.org/930693002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294151 0039d316-1c4b-4281-b951-d872f2087c98
Reland crrev.com/743083002, which was reverted in crrev.com/796053002
due to some test flakiness, probably related with an old version of Git on
the bots. Relanding now that the infra has been updated to Trusty (plus
adding some de-flake precautions).
Original CL Description:
Make gclient ready for the Blink (DEPS to main project) transition
This CL makes gclient understand correctly whether a git project is
being moved from DEPS to an upper project and vice-versa.
The driving use case for this is the upcoming Blink merge, where
third_party/Webkit will be removed from DEPS (and .gitignore) and will
become part of the main project.
At present state, gclient leaves the .git folder around when a project
is removed from DEPS, and that causes many problems.
Furthermore this CL solves the performance problem of bisecting across
the merge point. The subproject's (Blink) .git/ folder is moved to a
backup location (in the main checkout root) and is restored when moving
backwards, avoiding a re-fetch when bisecting across the merge point.
BUG=431469
Review URL: https://codereview.chromium.org/910913003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294082 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
The test intoruced is flake (see crrev.com/753543006/).
Need to look into that with more patience as it reproduces only on precise.
Original issue's description:
> Make gclient ready for the Blink (DEPS to main project) transition
>
> This CL makes gclient understand correctly whether a git project is
> being moved from DEPS to an upper project and vice-versa.
> The driving use case for this is the upcoming Blink merge, where
> third_party/Webkit will be removed from DEPS (and .gitignore) and will
> become part of the main project.
>
> At present state, gclient leaves the .git folder around when a project
> is removed from DEPS, and that causes many problems.
>
> Furthermore this CL solves the performance problem of bisecting across
> the merge point. The subproject's (Blink) .git/ folder is moved to a
> backup location (in the main checkout root) and is restored when moving
> backwards, avoiding a re-fetch when bisecting across the merge point.
>
> BUG=431469
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=293329
TBR=iannucci@chromium.org,maruel@chromium.org,jochen@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=431469
Review URL: https://codereview.chromium.org/796053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293352 0039d316-1c4b-4281-b951-d872f2087c98
This CL makes gclient understand correctly whether a git project is
being moved from DEPS to an upper project and vice-versa.
The driving use case for this is the upcoming Blink merge, where
third_party/Webkit will be removed from DEPS (and .gitignore) and will
become part of the main project.
At present state, gclient leaves the .git folder around when a project
is removed from DEPS, and that causes many problems.
Furthermore this CL solves the performance problem of bisecting across
the merge point. The subproject's (Blink) .git/ folder is moved to a
backup location (in the main checkout root) and is restored when moving
backwards, avoiding a re-fetch when bisecting across the merge point.
BUG=431469
Review URL: https://codereview.chromium.org/743083002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293329 0039d316-1c4b-4281-b951-d872f2087c98
Then this was changed to CheckCallAndFilter it broke
the expectations of code in the buildbot tree:
scripts/slave/chromium_commands.py:extract_revisions
Alternatively we could update the expectations
of chromium_commands.py.
BUG= https://code.google.com/p/chromium/issues/detail?id=412818
Review URL: https://codereview.chromium.org/587253005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292072 0039d316-1c4b-4281-b951-d872f2087c98
This reverts commit 931b6c6a6c.
This was causing our try bots to fail on DEPS changes.
After applying the patch successfully, apply_issue.py tries to run gclient sync to get the updated DEPS, resulting in this error:
src (ERROR)
----------------------------------------
[0:00:00] Started.
----------------------------------------
Error:
____ src at origin/master
Your index contains uncommitted changes
Please commit, stash, or reset.
BUG=413326
TESTED=Manually: https://paste.googleplex.com/6375653263802368
Review URL: https://codereview.chromium.org/563873002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291932 0039d316-1c4b-4281-b951-d872f2087c98
Without --exit-code, diff-index always returns 0 and thus never throws
the exception for a dirty index.
R=iannucci@chromium.org
Review URL: https://codereview.chromium.org/548553003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291881 0039d316-1c4b-4281-b951-d872f2087c98
shlex.spit(), in addition to doing str.split(' '), also strips out '\\'
from windows paths, which causes the cache_dir check to fail and Gclient to think
that we're not in cache_dir mode even if we are.
Instead of using shlex to strip data from a stdout log, I think regex is more
suited for this job.
BUG=405973
Review URL: https://codereview.chromium.org/497053002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291446 0039d316-1c4b-4281-b951-d872f2087c98
This allows cache_dir to be enabled on bots when the individual repo path has
changes (like android_tools, which has a bunch of generated, non-ignored .h
files)
R=agable@chromium.org, szager@chromium.org
BUG=
Review URL: https://codereview.chromium.org/488273003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@290943 0039d316-1c4b-4281-b951-d872f2087c98
Original CL: https://codereview.chromium.org/440263002/
Many people* have complained on chromium-dev about the long times
required to perform a full fetch over a DSL. This seems to be mostly
due to the huge size of chromium's history (~9 GB). On the other side,
not everybody is interested in downloading the full git history of
the projects. The size of git packs required to fetch a working HEAD
is one order of magnitude smaller (1.5 GB).
This change makes it possible to perform a shallow fetch (in a way
which is consistent with DEPS, leveraging git templates on clone),
reducing fetch times by 80% for those not interested in the history.
* See:
[chromium-dev] "fetch chromium" keeps hanging/getting stuck on Windows 7
[chromium-dev] Initial checkout with git taking long
[chromium-dev] Trying to get latest source code fails when fetching
[chromium-dev] Gclient sync takes too long
BUG=228996
TBR=iannucci@chromium.org,szager@chromium.org,wtc@chromium.org
Review URL: https://codereview.chromium.org/440273002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@287793 0039d316-1c4b-4281-b951-d872f2087c98
Reason for revert:
Broke the WebRTC waterfall:
http://build.chromium.org/p/tryserver.webrtc/builders/win/builds/3958/steps/gclient%20revert/logs/stdio
Original issue's description:
> Add --no-history option to fetch and gclient for shallow clones.
>
> Many people* have complained on chromium-dev about the long times
> required to perform a full fetch over a DSL. This seems to be mostly
> due to the huge size of chromium's history (~9 GB). On the other side,
> not everybody is interested in downloading the full git history of
> the projects. The size of git packs required to fetch a working HEAD
> is one order of magnitude smaller (1.5 GB).
> This change makes it possible to perform a shallow fetch (in a way
> which is consistent with DEPS, leveraging git templates on clone),
> reducing fetch times by 80% for those not interested in the history.
>
> * See:
> [chromium-dev] "fetch chromium" keeps hanging/getting stuck on Windows 7
> [chromium-dev] Initial checkout with git taking long
> [chromium-dev] Trying to get latest source code fails when fetching
> [chromium-dev] Gclient sync takes too long
>
> BUG=228996
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=287606
TBR=iannucci@chromium.org,szager@chromium.org,wtc@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=228996
Review URL: https://codereview.chromium.org/440263002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@287637 0039d316-1c4b-4281-b951-d872f2087c98
Many people* have complained on chromium-dev about the long times
required to perform a full fetch over a DSL. This seems to be mostly
due to the huge size of chromium's history (~9 GB). On the other side,
not everybody is interested in downloading the full git history of
the projects. The size of git packs required to fetch a working HEAD
is one order of magnitude smaller (1.5 GB).
This change makes it possible to perform a shallow fetch (in a way
which is consistent with DEPS, leveraging git templates on clone),
reducing fetch times by 80% for those not interested in the history.
* See:
[chromium-dev] "fetch chromium" keeps hanging/getting stuck on Windows 7
[chromium-dev] Initial checkout with git taking long
[chromium-dev] Trying to get latest source code fails when fetching
[chromium-dev] Gclient sync takes too long
BUG=228996
Review URL: https://codereview.chromium.org/437903002
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@287606 0039d316-1c4b-4281-b951-d872f2087c98
Created the 'GitRefish' class to centralize 'git' refish parsing and consistent
usage by 'gclient' 'git' code.
BUG=373504
TEST=localtest
R=agable@chromium.org, iannucci@chromium.org
Review URL: https://codereview.chromium.org/328843005
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281553 0039d316-1c4b-4281-b951-d872f2087c98
Replaced multiple various invocations of 'git fetch' with calls to a common
fetch function.
BUG=373504
TEST=localtest
Review URL: https://codereview.chromium.org/327803006
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@279560 0039d316-1c4b-4281-b951-d872f2087c98
Replaced multiple various invocations of 'git checkout' with calls to a common
checkout function.
BUG=373504
TEST=localtest
R=agable@chromium.org, iannucci@chromium.org
Review URL: https://codereview.chromium.org/326153003
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@279207 0039d316-1c4b-4281-b951-d872f2087c98