Commit Graph

267 Commits (76ce73c726a47dcac33bcfe596b7d1c3cdf09236)

Author SHA1 Message Date
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