Commit Graph

398 Commits (b73f8a96ec6daa0a6cfe5dfdab1c7249761a4b7d)

Author SHA1 Message Date
iannucci@chromium.org d9b318cff1 Add detection for locked git repos.
R=mithro@mithis.com, mmoss@chromium.org, vadimsh@chromium.org
BUG=405426

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297850 0039d316-1c4b-4281-b951-d872f2087c98
9 years ago
tandrii@chromium.org c438c148dc Gclient with git cache: delete conflicting mirror.
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
10 years ago
mmoss@chromium.org 37ac0e3cfe Really update config whenever --with_branch_heads is given.
R=maruel@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296352 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
tandrii@chromium.org ef14192d7e Make gclient revert work with DEPS when DEPS url changes.
BUG=520067

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296278 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
iannucci@chromium.org 9e18dee0a2 Improve gclient_scm SVN deprecation message.
R=hinoka@chromium.org, maruel@chromium.org, stip@chromium.org
BUG=513567,475230

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@296138 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
szager@chromium.org 8dd354610f Update .git/objects/info/alternates when upstream url changes.
BUG=497943
R=hinoka@chromium.org,agable@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@295568 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
sergiyb@chromium.org ecc3795cc8 Add env variable to suppress the notice about deprecated SVN
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
10 years ago
maruel@chromium.org 79d6237ec0 Make gclient warn when svn is used.
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
10 years ago
primiano@chromium.org 4126556b4a Fix hook disable logic in gclient_scm (non-atomic os.rename on Windows)
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
10 years ago
e.hakkinen@samsung.com e8bc1aa828 gclient: Add '--no-bootstrap' sync option.
Review URL: https://codereview.chromium.org/1050853002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@294714 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
dnj@chromium.org 5b23e871ba gclient: Add '--auto_rebase' sync option.
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
10 years ago
primiano@chromium.org 1c1273893e Reland "Make gclient ready for the Blink (DEPS to main project)"
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
10 years ago
hinoka@chromium.org b091aa575e Switch the remaining third_party gsutil references to gsutil.py
BUG=
R=pgervais@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293481 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
primiano@chromium.org a64c0b083b Revert of Make gclient ready for the Blink (DEPS to main project) transition (patchset #6 id:180001 of https://codereview.chromium.org/743083002/)
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
10 years ago
primiano@chromium.org fcf03763e0 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/743083002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293329 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
avakulenko@google.com 255f2bea85 Update cpplint.py to r141.
This just a copy of cpplint.py from upstream [1].

[1] https://code.google.com/p/google-styleguide/source/detail?spec=svn141&r=141

The change in gclient_scm.py is to address a presubmit check error
which was introduced by https://codereview.chromium.org/227163002
"print_func" parameter was being passed to a function instead of
the object constructor.

BUG=None
NOTRY=True

Change-Id: I4dca890d5f02957ddae33c4bd4269fd37758be3d

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@293276 0039d316-1c4b-4281-b951-d872f2087c98
10 years ago
agable@chromium.org 44ae4fb5d4 Let gclient config accept file:// urls.
R=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@292613 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
sbc@chromium.org 2cd0b8ed46 Use CheckCallAndFilterAndHeader for git commands.
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
11 years ago
smut@google.com 27c9c8af44 Revert "Make check for dirty index work."
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
11 years ago
mmoss@chromium.org 6e7202bd11 Fix gclient branch ref mangling and allow --force branch switches.
R=iannucci@chromium.org, maruel@chromium.org
BUG=410959

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291883 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org 931b6c6a6c Make check for dirty index work.
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
11 years ago
vadimsh@chromium.org 3fd325b2f0 Don't freak out if 'ignore_locks' options is not set.
BUG=406636
R=stip@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291561 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 3ec84f61ea Sometimes options won't have a 'shallow' field. Don't freak out.
BUG=406535
R=stip@chromium.org,vadimsh@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@291502 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org fa2b9b4f85 Use a regex instead of shlex.split() to get remote url
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
11 years ago
iannucci@chromium.org 785142189e Only check for clean repos when not (--force or --reset).
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
11 years ago
szager@chromium.org 8d3348fc7a Add --with_tags to enable git tag fetching.
Needed for chromeos ebuild.

BUG=chromium:376027
R=mmoss@chromium.org,hinoka@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@290683 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
primiano@chromium.org 5439ea5996 Reland: Add --no-history option to fetch and gclient for shallow clones.
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
11 years ago
primiano@chromium.org 69177ea3ba Revert of Add --no-history option to fetch and gclient for shallow clones. (https://codereview.chromium.org/437903002/)
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
11 years ago
primiano@chromium.org 107bca31f6 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

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
11 years ago
smut@google.com d33eab3e58 Revert of Consolidated 'git' refish parsing into a class (https://codereview.chromium.org/328843005/)
Reason for revert:
https://code.google.com/p/chromium/issues/detail?id=391871

Original issue's description:
> Consolidated 'git' refish parsing into a class
>
> 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
>
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=281553

TBR=dnj
BUG=391871

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@281572 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
dnj@chromium.org f2707a6d93 Consolidated 'git' refish parsing into a class
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
11 years ago
dnj@chromium.org 680f217174 Added common git 'fetch' function
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
11 years ago
dnj@chromium.org bb424c0fdb Added common git 'checkout' function
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
11 years ago
hinoka@chromium.org 8a10f6de3e Add option to gclient to ignore cache locks
BUG=261741

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@279150 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
vadimsh@chromium.org 2b7d3ed286 Allow gclient sync to overwrite untracked files when moving detached git HEAD.
Do it only when both --force and --delete_unversioned_trees are specified.

BUG=386878
R=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@278770 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 8a13970ea2 Remove hooks until Windows performance issues are sorted.
R=iannucci@chromium.org,hinoka@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@278717 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org b0a13a2a2f Refactor cache-updating code to eliminate unnecessary fetches.
This is an update of the following reverted change:

https://codereview.chromium.org/344443002/

R=hinoka@chromium.org,agable@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277931 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 3dc5cb77d8 Revert "If managed=False, don't fetch."
This reverts commit 617a1617cf.

BUG=385417
TBR=hinoka@chromium.org,agable@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277766 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 617a1617cf If managed=False, don't fetch.
This is an issue when bot_update.py is used, and a top-level
solution takes a long time to fetch.  Without this change, it will
be fetched twice.

managed=False really means 'hands off my checkout', so gclient
should honor that.

R=hinoka@chromium.org,agable@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@277565 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org 1a6bec0f5f Call _UpdateBranchHeads within _Clone.
This will avoid errors where _Clone is called for a new DEP, but where the DEP
refers to a branch commit, thus causing the clone to fail because it can't
checkout that commit (such as happens currently with 'fetch v8').

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@274347 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
romain.pokrzywka@gmail.com 483a0ba3f5 Handle branch or commit refs in the url for unmanaged git solutions
This allows having a git repo cloned on a specific branch or commit, similar to
what's possible for svn solutions by specifying a url like svnrepo/branches/foo

Having the possibility to check the code out on a specific branch makes the
initial code checkout workflow simpler, and allows specifying all the relevant
info directly in the fetch recipe, instead of  having to deal with branches
manually afterwards (which is the whole purpose of recipes in the first place)

So with this change, I'm able to do the following in my custom fetch recipe:

    solution = {
        'name' : 'src',
        'url' : 'git@github.snei.sony.com:SNEI/chromium.git@refs/heads/custombranch',
        <following lines skipped>

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@273675 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@chromium.org 46b874144e Pass shallow flag through gclient to git_cache.py
BUG=261741

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@270542 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com b225621281 gclient: Actually move or delete mismatched checkouts
Followup to https://codereview.chromium.org/189913020/ ("gclient: print a warning if a dep would get deleted or moved in the future")

BUG=skia:1638

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@268944 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
jochen@chromium.org 048da08e1e Add recipe for v8
BUG=none
R=dpranke@chromium.org,machenbach@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@268466 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org ce2fccbdc1 self._Capture -> scm.GIT.Capture.
This is a special case where we want to run a git command, even if
it's an SVNWrapper instance.

R=iannucci@chromium.org,agable@chromium.org
BUG=369145

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@267707 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 90fe58b610 gclient_scm: Only _DeleteOrMove if _Clone fails
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@267587 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 69995f4984 Fix gclient to correctly check out remote refs during update.
Currently, any bot run with "--revision=project@origin/master" fails, because
it fetches the remote ref into refs/remotes/origin/master, but then checks out
refs/heads/master, which hasn't been rolled forward. This is very similar to
the bug fixed by https://codereview.chromium.org/85473007

However, I am very wary of this patch, because I am worried about changing
something commented with " For compatibility...". Marc-Antoine, please comment.

R=maruel@chromium.org, smut@chromium.org, stip@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@266251 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 356cb5f4d6 Comment out lkcr/lkgr fetching from chromium/src.git's git cache
This isn't doing anything, and is currently costing 20 seconds of idle time
per bot_update run.  Lets remove it until we convert lkcr/lkgr to tags.

BUG=261741

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@266055 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 6d8115d009 Eliminate all interactive terminal prompts from git.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265735 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com a2aec97d74 gclient_scm: Assume URLs containing 'googlesource' are for Git repos
Fixes this flow, which currently assumes we're using an svn checkout:

gclient config https://chromium.googlesource.com/chromium/blink
gclient sync

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265369 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com a9d9aa429f gclient: Only _DeleteOrMove if the destination directory is non-empty
BUG=364601

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265298 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 6cd41b6916 Show input prompt even on error.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265112 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org 3031d733c4 Revert of Run `svn cleanup` before every update and reset. (https://chromiumcodereview.appspot.com/240503007/)
Reason for revert:
It's inconclusive if this actually helped the bots, so reverting.

Original issue's description:
> Run `svn cleanup` before every update and reset.
> 
> Testing on a bot with an 'unclean' Chromium checkout:
> 
> Unpatched `gclient revert -v -v -v --nohooks --upstream` (unclean checkout)
> real    9m14.280s
> user    0m37.238s
> sys     0m37.738s
> 
> Patched 'gclient revert -v -v -v --nohooks --upstream'  (unclean checkout)
> real    5m50.065s
> user    1m18.889s
> sys     0m57.860s
> 
> ---------------- after patched gclient revert run (cleans the checkout)
> 
> Unpatched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
> real    0m21.602s
> user    0m24.966s
> sys     0m13.969s
> 
> Patched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
> real    0m27.467s
> user    0m28.382s
> sys     0m22.629s
> 
> BUG=336983
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=264753

TBR=dpranke@chromium.org,iannucci@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=336983

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265093 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org f1d73ebb9c Fix url parameter to DefaultIndexPackConfig().
BUG=349576

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@265012 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
stip@chromium.org c310473cf5 Run `svn cleanup` before every update and reset.
Testing on a bot with an 'unclean' Chromium checkout:

Unpatched `gclient revert -v -v -v --nohooks --upstream` (unclean checkout)
real    9m14.280s
user    0m37.238s
sys     0m37.738s

Patched 'gclient revert -v -v -v --nohooks --upstream'  (unclean checkout)
real    5m50.065s
user    1m18.889s
sys     0m57.860s

---------------- after patched gclient revert run (cleans the checkout)

Unpatched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
real    0m21.602s
user    0m24.966s
sys     0m13.969s

Patched 'gclient revert -v -v -v --nohooks --upstream' (clean checkout)
real    0m27.467s
user    0m28.382s
sys     0m22.629s

BUG=336983

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264753 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com b1b5457a14 branch heads fix
--with_branch_heads doesn't work with cache_dir, this fixes it.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@264331 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 97a04f2055 gclient: fix deletion warning for checkouts created with "gclient config --name ."
BUG=skia:1945

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263081 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 46d09f6c6c SplitUrlRevision when obtaining the cache_dir in gclient_scm.GetActualRemoteURL
BUG=361155

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@263038 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com c3e09d2303 Fix for GitWrapper._Capture
BUG=361155

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262977 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org d09487b8d7 Get rid of UpdateSubmoduleConfig.
It runs very slowly on Windows, and it will soon be obsolete.

BUG=
R=iannucci@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262770 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com b09097a42c gclient: print a warning if a dep would get deleted or moved in the future
BUG=skia:1638

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262761 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 848fd49331 Make git_cache.py import-able.
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
11 years ago
jochen@chromium.org 3676b3f270 Also fetch branch heads if requested on initial sync
BUG=none
R=agable@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262506 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org fe0d1902b3 Revamped terminal output for update.
Features:

- Non-verbose output is now limited to a one-line progress
indicator.

- Verbose output is now collated per subprocess.  As soon as a
subprocess finishes, its full output is dumped to terminal.

- Verbose output is prefixed with timestamps representing elapsed
time since the beginning of the gclient invocation.

- git progress indicators ("Receiving objects", etc.) are limited to
one line every 10 seconds.

- In both verbose and non-verbose mode, if a failure occurs, the
full output of the failed update operation is dumped to terminal
just before exit.

- In the event that updates are progressing, but slowly,
"Still working" messages will be printed periodically, to pacify
users and buildbots.

BUG=
R=hinoka@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262500 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 4e9be26d99 gclient: Fix cache_dir functionality
BUG=361155

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@262478 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 8156c9f768 Ignore anything after '@' in SCMWrapper.DoesRemoteURLMatch
BUG=356881

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260887 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 772efaf8bc Use CheckCallAndFilterAndHeader for git commands.
This causes git commands to be completely silent (they don't even print
______ running 'git foo bar') if the git command itself is completely silent.
This mirrors the behavior of SVN commands. This is useful for commands like
'gclient diff', which should print no output at all if there is no diff.

R=szager@chromium.org, vadimsh@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@260758 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org ff11329dfa Disabled threaded index-pack for known difficult repositories.
BUG=349576
R=mmoss@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@259164 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com bda475e2f8 gclient: Fix nested checkout bug when validating .gclient
BUG=355492

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@258989 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 88d100836d gclient: in managed mode, warn if .gclient has a mismatched URL
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@258617 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org fc61638380 Rationalize the git config settings for index-pack performance.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@257728 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 1b8f0abf17 Remove --shallow from git cache call in gclient
We don't want to do a shallow clone into the cache because it is not supported
on versions of git older than 1.9.

BUG=261741

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@257578 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org d0b0a5b08c Revert of Another attempt: gclient: delete mismatching checkouts (https://codereview.chromium.org/183283003/)
Reason for revert:
Broke `gclient sync` for me, failing with:

Error: 1> Can't update/checkout /Volumes/MacintoshHD2/src/chrome-git/src if an unversioned directory is present. Delete the directory and try again.


For someone else, it broke it with:

% gclient sync

________ unmanaged solution; skipping src

Error: Command svn info --xml returned non-zero exit status 1 in /Users/pawliger/chromium/src/.

<?xml version="1.0" encoding="UTF-8"?>

<info>

svn: E155007: '/Users/pawliger/chromium/src' is not a working copy

Original issue's description:
> Another attempt: gclient: delete mismatching checkouts
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=255930

TBR=iannucci@chromium.org,szager@chromium.org,maruel@chromium.org,mmoss@chromium.org,borenet@google.com
NOTREECHECKS=true
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@256005 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 7ff04292ac Another attempt: gclient: delete mismatching checkouts
Review URL: https://codereview.chromium.org/183283003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@255930 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 703fe5d2c3 Need to run git cache exists in a directory we know for sure that exists
We don't want to run it in the DEPS directory, which is apperently what
the default behavior is.

BUG=339171

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254266 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 267f33e6ad Make gclient_scm.py use cache_dir
Instead of having custom logic for dealing with cache directories, use
git_cache.py to populate caches.

Also fixes a bug in git_cache.py where it was looking for lockfiles in cwd rather than the cache dir.

Other changes:
* _Run now returns output.
* Always print to stdout in CheckCallAndFilterOutput, even if it gets a carriage return.  This is done because git progress report are carriage returns and not newlines and we don't want everything on the same line and not strip out the CRs.
* Removed members changed tests, its not very useful to know a new import is added.

BUG=339171

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@254248 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 6c2b49d392 Revert "Re-re-land gclient deletion of mismatching checkouts again"
This reverts commit 6ff5448534.

'fetch --nohooks chromium' is broken with this change.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253640 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 6ff5448534 Re-re-land gclient deletion of mismatching checkouts again
Review URL: https://codereview.chromium.org/164053003

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253616 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
agable@chromium.org 5a306a2aa6 Create "git cache" command.
The git cache command is a central place to manage a machine's git cache.

It provides two subcommands:
* populate -- creates or updates the cache of a given repository
* exists -- prints the path to the cache of a repo, if it exists

Gclient, deps2git, bot_update, and any other tools that touch the cache will
be able to use this command to make sure that everyone is interacting with
the cache in the same way.

R=hinoka@chromium.org, iannucci@chromium.org
BUG=339168

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@253007 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
iannucci@chromium.org 9a8b066e52 Make gclient reset use GetUsableRev.
One line for the fix, 30 lines for the test :)

R=kbr@chromium.org, mmoss@chromium.org, stip@chromium.org, szager@chromium.org
BUG=345073

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@252138 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
zty@chromium.org 6279e8a389 Log gclient revert exceptions
BUG=336460

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250904 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mmoss@chromium.org 50fd47f55f Revert 250482 "Re-reland r245404 ("If the destination directory ..."
> Re-reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
> 
> BUG=
> 
> Review URL: https://codereview.chromium.org/133073015

TBR=borenet@google.com

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250878 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 78d78f3c61 Change --mirror to --bare in gclient_scm.py for cache directories
BUG=339168

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250547 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 255b5d97da Re-reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@250482 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 3dce24f8bb Revert of Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it") (https://codereview.chromium.org/131743022/)
Reason for revert:
This is still failing third_party DEPS for git-svn...

Original issue's description:
> Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
> 
> BUG=
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=249143

TBR=iannucci@chromium.org,maruel@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249216 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com 8456c48528 Reland r245404 ("If the destination directory doesn't contain the desired repo, delete it")
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249143 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
mariakhomenko@chromium.org a2ede5cb04 Consider sso:// repos to be git-managed.
This allows gclient to manage sso:// git repositories.

BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@249130 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
bauerb@chromium.org 30c46d64d7 Merge instead of rebasing upstream changes in `gclient sync` when --merge is given.
Merge ALL the things!

BUG=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@246575 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
thakis@chromium.org 0a0e31065c Revert of If the destination directory doesn't contain the desired repo, delete it (https://codereview.chromium.org/61623008/)
Reason for revert:
This breaks `gclient sync` for me. Before this patch:
________ found .git directory; skipping src

After this patch:
Error: 1> Can't update/checkout /Volumes/MacintoshHD2/src/chrome-git/src if an unversioned directory is present. Delete the directory and try again.


Original issue's description:
> If the destination directory doesn't contain the desired repo, delete it
> 
> Basic functionality - this may not be in quite the right place.
> 
> Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=245404

TBR=iannucci@chromium.org,ilevy@chromium.org,cmp@chromium.org,maruel@chromium.org,morrita@chromium.org,borenet@google.com
NOTREECHECKS=true
NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245530 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com ca35be3112 Gate tarball downloading based on SVN url
BUG=334114

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245414 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
borenet@google.com b75a835e65 If the destination directory doesn't contain the desired repo, delete it
Basic functionality - this may not be in quite the right place.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245404 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
szager@chromium.org 57482371da Always ignore submodules.
R=phadjan@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@245272 0039d316-1c4b-4281-b951-d872f2087c98
11 years ago
hinoka@google.com 2f2ca1462d Checkout tarball for chrome and blink for initial sync on a bot
BUG=327494

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@243221 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
agable@chromium.org fd5b638293 Remove git_filter=True from git cache_dir commands.
This helps prevent timeout when checking out large repositories (like blink)
using the git cache_dir.

R=iannucci@chromium.org, maruel@chromium.org
BUG=295119

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@231111 0039d316-1c4b-4281-b951-d872f2087c98
12 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
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
mmoss@chromium.org 77bd7360ab Don't allow 'detached head' branch creation to fail.
This fixes an error if the branch already exists.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@225278 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
kustermann@google.com 1580d959c3 Bugfix in gclient_scm.py: Remove the correct directories if svn checkout is in a broken state
Review URL: https://chromiumcodereview.appspot.com/22886004

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@218239 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
iannucci@chromium.org 578e5e548f Catch and print OSError instead of Exception.
Also open the altfile with 'w' because we assume ownership over the object
alternates. The logic to correctly support other alternates would be quite
complex, so don't even imply support.

R=maruel@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@212426 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 976a14dc97 When switching to/from a cache git dir, try to reuse as much data as possible.
R=szager@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@212140 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org ecb7542302 Get rid of place-holder for commit-msg hook.
This caused problems for repo-based projects that need to install the
standard Change-Id commit-msg hook.

With the commit-msg hook gone, we can also reinstate the --template
argument to 'git clone'.

BUG=235215
R=iannucci@chromium.org, ilevy@chromium.org, maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@211464 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org 3ce4184f8c Document the use of GIT_ASKPASS and SSH_ASKPASS.
BUG=
R=dpranke@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@211148 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
szager@chromium.org 7f834ad2f1 Do not prompt for passwords
Forcing function for developers to create a .netrc file.
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210686 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
joi@chromium.org f10ffa9069 Set timeout before killing a process to 30 times the 30-second nag
timer, i.e. ~900 seconds.

This should at least help make 'fetch chromium' slightly more reliable
over somewhat slow connections.

BUG=230691,247173
R=rogerta@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210190 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 396e1a6d9e If we're running in nohooks mode, don't bother to accumulate file_list in gclient.
This enables significant time savings, especially since file_list only exists to
enable file-specific hooks (which, AFAIK, nothing actually uses). On a z620
(linux) using the cached git repos, a first-time `gclient sync --nohooks` takes:
  * (with)    131.06s user 14.10s  system 117% cpu 2:03.89 total
  * (without) 482.13s user 189.35s system 144% cpu 7:45.63 total

This change makes nohooks cause file_list to be None if we don't need to
accumulate it, and updates GitWrapper and SvnWrapper appropriately.

R=szager@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@210026 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
ilevy@chromium.org a41249c2b3 Misc gclient cleanup
- Use config --local for properties that should be local.
- Remove git fetch retry logic, it should not be necessary
  with the googlesource hosts.
- Include .strip() in GIT.Capture, simplifying other calls.
- Safer testing of whether dep revision is a sha.
- Fix refs/remotes/ DEPS branch detection

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@209825 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org b837688ee6 Set core.deltaBaseCacheLimit on fetch-type operations in gclient.
R=dpranke@chromium.org
BUG=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@209483 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
xusydoc@chromium.org c376171c1b Repair broken git checkouts caused by aborting git clone.
BUG=248384

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@205692 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
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
ilevy@chromium.org f6f5840276 Fix gclient sync 'dontswitchurl' url stickiness
._Capture throws exception on non-zero status, switch to
subprocess2 capture method. Switch magic value to dontswitchurl.

BUG=241907
R=dpranke@chromium.org, maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@201397 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
ilevy@chromium.org 6bb0c6e27f Add option to prevent gclient from changing remote
Allow users to set a git config entry which stops
gclient from messing with remote.origin.url. Useful
for using experimental repos.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@199532 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
szager@chromium.org ee10d7d79a Revert http://crrev.com/195336
BUG=235215

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@196259 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
szager@chromium.org 71cbb503c8 Add placeholder git hooks.
This is a bit of future-proofing.  The git hooks in depot_tools/git-templates/hooks all try to forward to build/git-hooks.

Currently, the only actual hook we have is in src/build/git-hooks/pre-commit, which (usefully) makes sure no one inadvertently commits a submodule change.  If we want to add more git hooks, we can simply commit them to build/git-hooks, rather than asking everyone to modify .git/hooks in their checkout.

NOTRY=true

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@195336 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org 96833fa216 Support "--with_branch_heads" for unmanaged checkouts.
R=piman@chromium.org,maruel@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194527 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org e409df67b0 Make sure branch-heads is configured whenever requested.
This allows the branch-heads to be pulled even if not configured on the
original clone.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@194382 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 08b21bfe31 Unpoison gclient checkouts by setting recurseSubmodules=false
This was causing extremely slow gclient sync's, and was preventing gclient from
outputting anything if a slow submodule needed significant updating.

R=cmp@chromium.org
BUG=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192475 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
iannucci@chromium.org 6ede85ff7b Revert "Make gclient fetch git repos recursively. This is needed when adding a git repo through DEPS. If that repo has submodules, we need to fetch them or else the repo won't be complete."
This reverts commit 6a2e4710bf.

cmp says:
This CL causes NewGit and Git submodules workflows to comingle in ways that result in bad and unexpected failures for new and existing users.  One failure is for the new Blink developers who need to use git-svn with their WebKit third_party checkout.  Another failure is in the Windows NewGit workflow where gclient sync takes longer than necessary to complete.

The right approach at this point given the costs of this change is to revert it and rethink the best way to get projects the functionality they need while restoring the functionality existing projects have required for over a year now.

Please discuss the recursive/recurseSubmodules code face-to-face with cmp@google.com before attempting to make this live again.  Thanks.

R=cmp@chromium.org
BUG=224074


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@192236 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org 628522eb8d Don't replace default fetch config with branch-heads.
This causes the 'git config' to only add or update the branch-heads fetch
entry, and not replace any other existing entry (e.g. refs/heads/*).

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@189326 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
jam@chromium.org 6a2e4710bf Make gclient fetch git repos recursively. This is needed when adding a git repo through DEPS. If that repo has submodules, we need to fetch them or else the repo won't be complete.
Review URL: https://chromiumcodereview.appspot.com/12620024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@189026 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org 059cc45058 Separate git 'clone' and 'config' commands.
Some versions of git don't support 'clone --config'.
Review URL: https://codereview.chromium.org/12688005

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@187296 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org 468ed06910 Reapply r186598 with fix for 'gclient revert'.
Review URL: https://codereview.chromium.org/12553006

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186986 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
kjellander@chromium.org 9ffd050bd7 Revert 186598 ("Add option to automatically fetch git "branch-heads".")
Some SVN-only trybots get errors when running gclient revert with this
change. I assume it's because the flag is not present for the gclient
revert command, and that the code checking if options.with_branch_heads
is set is common to both revert and sync.

BUG=none
TEST=reverted locally and gclient revert worked again.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186967 0039d316-1c4b-4281-b951-d872f2087c98
12 years ago
mmoss@chromium.org 4433ad0ef2 Add option to automatically fetch git "branch-heads".
The "branch-heads" are refspecs created from upstream svn branches. This flag
is mostly needed for official builders, and adds about 1/2GB of data to the
checkout, so not currently enabling by default.
Review URL: https://codereview.chromium.org/12546017

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@186598 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
bauerb@chromium.org 610060ef0e Reset to correct version when switching upstream repository for a git dependency.
This avoids build errors like at http://build.chromium.org/p/tryserver.chromium/builders/linux_clang/builds/64851/steps/update/logs/stdio (search for mtpd).

BUG=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@168521 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
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
szager@google.com 312a6a4e7a Fix safesync_url handling for git.
Takes into account the new submodule-enabled repository layout.
Review URL: https://codereview.chromium.org/11098064

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@161403 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
szager@chromium.org 987b06195e Set default for branch.autosetupmerge. This avoids problems with git-cl-upload
picking the wrong upstream branch.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@145791 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 9206738c68 Only call IsValidRevision() when it is a git hash.
Calling IsValidRevision('refs/head/master') will always return True.

TBR=bauerb@chromium.org
BUG=134858
TEST=Tested manually with 'managed': True


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@144786 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
bauerb@chromium.org cbd20a408f Skip updating remotes if we already have the upstream revision.
This should make a `gclient sync` faster, especially on Windows, where git hangs regularly.

BUG=none
TEST=gclient sync -v doesn't print "Fetching origin" all the time


Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=143898
Reverted: http://src.chromium.org/viewvc/chrome?view=rev&revision=143911

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@144451 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
bauerb@chromium.org 91514ab28c Revert 143898 - Skip updating remotes if we already have the upstream revision.
TBR=maruel@chromium.org

BUG=none
TEST=none


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143911 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
bauerb@chromium.org f407f09f2f Skip updating remotes if we already have the upstream revision.
This should make a `gclient sync` faster, especially on Windows, where git hangs regularly.

BUG=none
TEST=gclient sync -v doesn't print "Fetching origin" all the time


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143898 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org 78f5c16451 Set config option for diff.ignoreSubmodules to 'all'
Review URL: https://chromiumcodereview.appspot.com/10636015

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143731 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org f5cc4279b0 Call UpdateSubmoduleConfig() in unmanaged mode, too.
Review URL: https://chromiumcodereview.appspot.com/10635010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143474 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org 37e4f23403 Use default value of 'all' for submodule.*.ignore.
Review URL: https://chromiumcodereview.appspot.com/10630010

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@143464 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@chromium.org d4af662bd6 Automatically update submodule config entries on sync.
The effect of this is to preserve the behavior of `git status`,
i.e., only changes in the top-level repository will be reported.

Updated test expectations; I have no idea what I'm doing.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@140396 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
haitao.feng@intel.com 306080c46d Make gclient pack work again by not prefixing "thread_id>"
into stdout and creating the GitDiffFilterer for git repository

BUG=125894
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@135324 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
mukai@chromium.org 9e3e82c1b3 Check binary existence in gclient: 2nd try.
The first approach crrev.com/132446 was reverted due to
Windows build breaks. This approach is more robust because
it actually tests the binary by running the command actually.

BUG=114483
TEST=succeeded on Linux

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

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