Commit Graph

171 Commits (cc023508e4bdf74965d502389b8cdd7de0b04168)

Author SHA1 Message Date
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
maruel@chromium.org 2a0108ebdb Revert r132446 "Check the existence and executability of scm commands"
This completely broke syncing on Windows.

TBR=mukai@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132451 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
mukai@chromium.org d15a8fa135 Check the existence and executability of scm commands
BUG=114483
TEST=manually

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@132446 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
szager@google.com 873e6672e1 If a subdir exists and is empty, go ahead and clone into it.
This will make it easier to support git-submodule and gclient at
the same time.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@126428 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
steveblock@chromium.org 98e6945846 If both -R and -D are specified when updating, remove all untracked directories
This is required to avoid the need to clobber the bots when moving a directory 
to deps/. Currently, the directory in question is likely to remain in the 
working copy, despite having been removed, due to the presence of untracked 
files. This causes the checkout from deps/ to fail. 

With this change, when both --reset and --delete_unversioned_trees are 
specified, the the directory in question will be removed from the working copy, 
thereby allowing the copy in deps/ to be checked out correctly. 

Note that untracked directories which are explicitly ignored (ie in .gitignore 
or svn:ignore) will not be removed. 

Note that this was previously landed in http://codereview.chromium.org/9348054 
but reverted due to problems with symlinks in the chromeos build. 

BUG=112887, chromium-os:20759

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122300 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 30159da655 Revert r121986 "If both -f and -D are specified when updating, remove all untracked directories"
Caused issues with chromium.chromiumos bots.

TBR=steveblock@chromium.org
BUG=112887

TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@122098 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dbeam@chromium.org 2a75fdb0fc [depot_tools] Use git fetch to optimize the properly configured that use git-svn
in the way <http://code.google.com/p/chromium/wiki/UsingNewGit#Initial_checkout>
describes.

R=maruel@chromium.org
TEST=gclient sync with safesync_url is faster.
BUG=109184


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121988 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
steveblock@chromium.org 93567043f9 If both -f and -D are specified when updating, remove all untracked directories
This is required to avoid the need to clobber the bots when moving a directory
to deps/. Currently, the directory in question is likely to remain in the
working copy, despite having been removed, due to the presence of untracked
files. This causes the checkout from deps/ to fail.

With this change, when both --force and --delete_unversioned_trees are
specified, the the directory in question will be removed from the working copy,
thereby allowing the copy in deps/ to be checked out correctly.

Note that untracked directories which are explicitly ignored (ie in .gitignore
or svn:ignore) will not be removed.

BUG=112887,chromium-os:20759

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@121986 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dbeam@chromium.org 051c88b9c0 [depot_tools] Disabling new git checkouts with safesync_urls until fixed.
R=maruel@chromium.org
TEST=gclient sync a freshly configured client.
BUG=106015


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@115452 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
dbeam@chromium.org e5d1e61dc3 [depot_tools] Adding safesync_url for git and git-svn checkouts.
R=maruel@chromium.org
TEST=Configure a checkout using the NewGitWorkflow with a safesync_url and everything works (though possibly with a really long git svn fetch time).
BUG=106015

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@115011 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org d579fcf951 Enforces using cwd in all svn calls.
That helps weed out some issues faces with svn plus helped me figure out some
misuses.

Most of the commands have been implicitly depending on os.getcwd(). This change
makes it always consistent and clear when dependence on the current directory is
needed.

Remove default arguments to scm.SVN.GenerateDiff and a few other calls to be
sure the refactoring was done right.

R=dpranke@chromium.org
BUG=
TEST=make sure most commands aren't broke


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@114262 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
igorgatis@gmail.com 4e07567f52 Introduced git+http(s) fake URL schema to support git urls which don't have "filename.git" portion (http://foo/bar vs http://foo/bar/filename.git).
Review URL: http://codereview.chromium.org/8590024

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@110937 0039d316-1c4b-4281-b951-d872f2087c98
13 years ago
maruel@chromium.org 8b322b3cb7 Handle cases where '.' show up in svn status and is deleted
This would cause random try job failures, especially when switching around
DEPS <-> svn directory conversion.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@108144 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 6c48a304d4 Fix a concurrency issue happening with deep dependencies when the intermediary
directory doesn't exist, on fresh checkout and --jobs >1.

It happens in the case where there is 3 dependencies:
a
a/b/c/d
a/b/c/e

'a' is processed first. Then 'a/b/c/d' and 'a/b/c/e' are fired simultaneously.
If both are not present, both svn checkout tries to mkdir b and b/c and a race
condition occurs between their call for isdir() and mkdir().

This works around the issue by creating the intermediary directories ourself
before calling out svn and managing the error ourself.

TBR=dpranke@chromium.org
BUG=
TEST=fresh checkout shouldn't be flaky


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@106636 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org c0cc0871b4 Make revert more resilient to partial sync failure.
Improve revert to skip over non managed directory and to clobber invalid
checkouts.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105103 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 36ac239bd3 Reapply r104938 "Make svn update not prompt during a sync."
It wasn't broken. The tree collapsed around the same time for unrelated reason.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@105090 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org edb6ea6ea5 Revert r104938 "Make svn update not prompt during a sync."
I'm not sure if it's causing the tree blow up but I'm not taking any chance.

TBR=dpranke@chromium.org
BUG=
TEST=

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104956 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 94aa50fce3 Make svn update not prompt during a sync.
Otherwise it may hangs in various ways.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104938 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 85d3e3adbc Restore 103787 (fix git progress message), and update test expectations.
Review URL: http://codereview.chromium.org/8161009

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@104504 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 43ea9d727b Reverting 103787
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103935 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
szager@google.com 7f61350080 http://codereview.chromium.org/8052025/
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@103787 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 49fcb0cba7 Print debugging information when svn info didn't return the URL
Right now, it'd simply crash with a KeyError.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102496 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org d558c4b36f GTTF: Make gclient recover gracefully from an interrupted checkout
when --force is used.

BUG=96775
Review URL: http://codereview.chromium.org/7942007

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102324 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
cmp@chromium.org eb2756dfc4 Add a --unmanaged flag to gclient config to allow the main solution to be unmanaged by the scm.
The dependencies will continue to be managed. A new flag is present in the .gclient file to control this behavior.

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@102002 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
phajdan.jr@chromium.org 8a312c56e9 GTTF: Make gclient try harder when doing svn cleanup.
BUG=96775

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@101771 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 87e6d33103 Update subprocess2.check_output() to behave like subprocess.check_output().
stderr is not redirected by default. stdout is not allowed.
Both were oversight.
Do not override stdin=None in case the user would response to stderr output for
example.

Increase test coverage.

R=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100456 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org 2a5b6a2aba Now that CheckCallAndFilter() throws subprocess2.CalledProcessError, use e.returncode.
deferring e.args[0] would throw an error.

TBR=dpranke@chromium.org
BUG=
TEST=


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

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@100402 0039d316-1c4b-4281-b951-d872f2087c98
14 years ago
maruel@chromium.org bffad37d6f Remove gclient_utils.CheckCall() from gclient_scm.py
R=dpranke@chromium.org
BUG=
TEST=


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

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