libv8 5.2.361.43.1 → 5.3.332.38.0beta2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -0
  3. data/CHANGELOG.md +4 -0
  4. data/README.md +1 -0
  5. data/Rakefile +4 -4
  6. data/ext/libv8/paths.rb +1 -1
  7. data/lib/libv8/version.rb +1 -1
  8. data/libv8.gemspec +1 -1
  9. data/patches/0001-Build-a-standalone-static-library.patch +4 -4
  10. data/patches/0002-Don-t-compile-unnecessary-stuff.patch +4 -4
  11. data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +4 -4
  12. data/patches/0004-Reinterpret-thread-hash-for-FreeBSD-too.patch +8 -8
  13. data/spec/location_spec.rb +1 -1
  14. data/vendor/depot_tools/README.gclient.md +67 -0
  15. data/vendor/depot_tools/README.git-cl.md +112 -0
  16. data/vendor/depot_tools/README.md +50 -36
  17. data/vendor/depot_tools/bootstrap/win/README.md +5 -5
  18. data/vendor/depot_tools/bootstrap/win/git_bootstrap.py +203 -0
  19. data/vendor/depot_tools/bootstrap/win/git_version.txt +1 -0
  20. data/vendor/depot_tools/bootstrap/win/git_version_bleeding_edge.txt +1 -0
  21. data/vendor/depot_tools/bootstrap/win/win_tools.bat +1 -148
  22. data/vendor/depot_tools/cit.py +27 -21
  23. data/vendor/depot_tools/codereview.settings +1 -1
  24. data/vendor/depot_tools/cpplint.py +1 -1
  25. data/vendor/depot_tools/fix_encoding.py +1 -1
  26. data/vendor/depot_tools/gclient.py +4 -3
  27. data/vendor/depot_tools/gclient_scm.py +20 -9
  28. data/vendor/depot_tools/gclient_utils.py +84 -13
  29. data/vendor/depot_tools/gerrit_util.py +1 -1
  30. data/vendor/depot_tools/git_cl.py +374 -218
  31. data/vendor/depot_tools/git_cl_completion.sh +34 -0
  32. data/vendor/depot_tools/git_common.py +11 -7
  33. data/vendor/depot_tools/infra/config/OWNERS +1 -0
  34. data/vendor/depot_tools/infra/config/cq.cfg +3 -12
  35. data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
  36. data/vendor/depot_tools/presubmit_canned_checks.py +4 -2
  37. data/vendor/depot_tools/presubmit_support.py +26 -40
  38. data/vendor/depot_tools/recipe_modules/bot_update/api.py +31 -11
  39. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/apply_gerrit_ref.json +26 -0
  40. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +1 -1
  41. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +1 -1
  42. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +1 -1
  43. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +1 -1
  44. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +1 -1
  45. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_rebase_patch_ref.json +44 -0
  46. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +1 -1
  47. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +1 -1
  48. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +1 -1
  49. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +1 -1
  50. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +1 -1
  51. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +1 -1
  52. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +1 -1
  53. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +1 -1
  54. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +1 -1
  55. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +3 -3
  56. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +1 -1
  57. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +1 -1
  58. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +1 -1
  59. data/vendor/depot_tools/recipe_modules/bot_update/example.py +35 -18
  60. data/vendor/depot_tools/recipe_modules/bot_update/resources/apply_gerrit.py +33 -0
  61. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +45 -76
  62. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +13 -18
  63. data/vendor/depot_tools/recipe_modules/cipd/__init__.py +10 -0
  64. data/vendor/depot_tools/recipe_modules/cipd/api.py +244 -0
  65. data/vendor/depot_tools/recipe_modules/cipd/example.expected/basic.json +445 -0
  66. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-failed.json +128 -0
  67. data/vendor/depot_tools/recipe_modules/cipd/example.expected/describe-many-instances.json +453 -0
  68. data/vendor/depot_tools/recipe_modules/cipd/example.expected/install-failed.json +31 -0
  69. data/vendor/depot_tools/recipe_modules/cipd/example.expected/mac64.json +445 -0
  70. data/vendor/depot_tools/recipe_modules/cipd/example.expected/win64.json +445 -0
  71. data/vendor/depot_tools/recipe_modules/cipd/example.py +115 -0
  72. data/vendor/depot_tools/recipe_modules/cipd/resources/bootstrap.py +218 -0
  73. data/vendor/depot_tools/recipe_modules/cipd/test_api.py +102 -0
  74. data/vendor/depot_tools/recipe_modules/gclient/api.py +34 -53
  75. data/vendor/depot_tools/recipe_modules/gclient/config.py +22 -128
  76. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +44 -6
  77. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +44 -6
  78. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +44 -17
  79. data/vendor/depot_tools/recipe_modules/gclient/example.py +1 -1
  80. data/vendor/depot_tools/recipe_modules/gclient/test_api.py +4 -9
  81. data/vendor/depot_tools/recipe_modules/git/api.py +25 -7
  82. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +3 -0
  83. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +3 -0
  84. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +3 -0
  85. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +3 -0
  86. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +3 -0
  87. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +3 -0
  88. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +3 -0
  89. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +3 -0
  90. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +3 -0
  91. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +3 -0
  92. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +3 -0
  93. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +3 -0
  94. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +3 -0
  95. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +2 -1
  96. data/vendor/depot_tools/recipe_modules/git/example.expected/git-cache-checkout.json +41 -3
  97. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +7 -1
  98. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +3 -0
  99. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +3 -0
  100. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +3 -0
  101. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +4 -1
  102. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +4 -1
  103. data/vendor/depot_tools/recipes.py +8 -2
  104. data/vendor/depot_tools/roll-dep-svn.bat +10 -10
  105. data/vendor/depot_tools/roll_dep.py +0 -1
  106. data/vendor/depot_tools/third_party/upload.py +1 -25
  107. data/vendor/depot_tools/upload_to_google_storage.py +1 -1
  108. metadata +24 -32
  109. data/release/armhf-linux/Vagrantfile +0 -97
  110. data/release/armhf-linux/initrd.img +0 -0
  111. data/release/armhf-linux/vmlinuz +0 -0
  112. data/release/x86-linux/Vagrantfile +0 -85
  113. data/release/x86_64-freebsd-10/Vagrantfile +0 -88
  114. data/release/x86_64-linux/Vagrantfile +0 -85
  115. data/vendor/depot_tools/README.codereview +0 -99
  116. data/vendor/depot_tools/README.gclient +0 -82
  117. data/vendor/depot_tools/README.git-cl +0 -52
  118. data/vendor/depot_tools/chrome-update-create-task.bat +0 -52
  119. data/vendor/depot_tools/chrome-update.bat +0 -5
  120. data/vendor/depot_tools/chrome-update.py +0 -91
  121. data/vendor/depot_tools/create-chromium-git-src +0 -200
  122. data/vendor/depot_tools/drover +0 -25
  123. data/vendor/depot_tools/drover.bat +0 -9
  124. data/vendor/depot_tools/drover.py +0 -648
  125. data/vendor/depot_tools/gcl +0 -8
  126. data/vendor/depot_tools/gcl.bat +0 -6
  127. data/vendor/depot_tools/gcl.py +0 -1523
  128. data/vendor/depot_tools/git-try +0 -9
  129. data/vendor/depot_tools/git_try.py +0 -76
  130. data/vendor/depot_tools/luci_hacks/README.md +0 -35
  131. data/vendor/depot_tools/luci_hacks/__init__.py +0 -0
  132. data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +0 -12
  133. data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +0 -81
  134. data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +0 -128
  135. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +0 -59
  136. data/vendor/depot_tools/trychange.py +0 -1265
@@ -1,82 +0,0 @@
1
- # Copyright 2008-2009, Google Inc.
2
-
3
- gclient is a tool for managing a modular checkout of source code
4
- from multiple source code repositories. It wraps underlying source
5
- code management commands to provide support for distributing tree
6
- updates, status commands, and diffs across multiple checked-out
7
- working directories.
8
-
9
-
10
- The gclient script is controlled by a ".gclient" file at the top
11
- of a directory tree which will contain source code from multiple
12
- locations. A ".gclient" file is a Python script that defines a list
13
- of "solutions" with the following format:
14
-
15
- solutions = [
16
- { "name" : "src",
17
- "url" : "svn://svnserver/component/trunk/src",
18
- "custom_deps" : {
19
- # To use the trunk of a component instead of what's in DEPS:
20
- #"component": "https://svnserver/component/trunk/",
21
- # To exclude a component from your working copy:
22
- #"data/really_large_component": None,
23
- }
24
- },
25
- ]
26
-
27
- A "solution" is a collection of component pieces of software that will
28
- be checked out in a specific directory layout for building together.
29
-
30
- Each entry in the "solutions" list is defined by a Python dictionary
31
- that contains the following items:
32
-
33
- name
34
- The name of the directory in which the solution will be
35
- checked out.
36
-
37
- url
38
- The URL from which this solution will be checked out.
39
- gclient expects that the checked-out solution will contain a
40
- file named "DEPS" that in turn defines the specific pieces
41
- that must be checked out to create the working directory
42
- layout for building and developing the solution's software.
43
-
44
- deps_file
45
- A string containing just the filename (not a path) of the file
46
- in the solution dir to use as the list of dependencies.
47
- This tag is optional, and defaults to "DEPS".
48
-
49
- custom_deps
50
- A dictionary containing optional custom overrides for entries
51
- in the solution's "DEPS" file. This can be used to have
52
- the local working directory *not* check out and update specific
53
- components, or to sync the local working-directory copy of a
54
- given component to a different specific revision, or a branch,
55
- or the head of a tree. It can also be used to append new entries
56
- that do not exist in the "DEPS" file.
57
-
58
- Within each checked-out solution, gclient expects to find a file
59
- typically named "DEPS" (it actually uses the value of the 'deps_file'
60
- key above) which defines the different component pieces of software
61
- that must be checked out for the solution. The "DEPS" file is a
62
- Python script that defines a dictionary named "deps":
63
-
64
- deps = {
65
- "src/outside" : "http://outside-server/trunk@1234",
66
- "src/component" : "svn://svnserver/component/trunk/src@77829",
67
- "src/relative" : "/trunk/src@77829",
68
- }
69
-
70
- Each item in the "deps" dictionary consists of a key-value pair.
71
- The key is the directory into which the component will be checked
72
- out, relative to the directory containing the ".gclient" file.
73
- The value is the URL from which that directory will be checked out.
74
- If there is no address scheme (that is, no "http:" or "svn:" prefix),
75
- then the value must begin with a slash and is treated relative to the
76
- root of the solution's repository.
77
-
78
- The URL typically contains a specific revision or change number (as
79
- appropriate for the underlying SCM system) to "freeze" the external
80
- software at a specific, known state. Alternatively, if there is no
81
- revision or change number, the URL will track the latest changes on the
82
- specific trunk or branch.
@@ -1,52 +0,0 @@
1
- # git-cl -- a git-command for integrating reviews on Rietveld
2
- # Copyright (C) 2008 Evan Martin <martine@danga.com>
3
-
4
- == Background
5
- Rietveld, also known as http://codereview.appspot.com, is a nice tool
6
- for code reviews. You upload a patch (and some other data) and it lets
7
- others comment on your patch.
8
-
9
- For more on how this all works conceptually, please see README.codereview.
10
- The remainder of this document is the nuts and bolts of using git-cl.
11
-
12
- == Install
13
- Copy (symlink) it into your path somewhere, along with Rietveld
14
- upload.py.
15
-
16
- == Setup
17
- Run this from your git checkout and answer some questions:
18
- $ git cl config
19
-
20
- == How to use it
21
- Make a new branch. Write some code. Commit it locally. Send it for
22
- review:
23
- $ git cl upload
24
- By default, it diffs against whatever branch the current branch is
25
- tracking (see "git checkout --track"). An optional last argument is
26
- passed to "git diff", allowing reviews against other heads.
27
-
28
- You'll be asked some questions, and the review issue number will be
29
- associated with your current git branch, so subsequent calls to upload
30
- will update that review rather than making a new one.
31
-
32
- == git-svn integration
33
- Review looks good? Commit the code:
34
- $ git cl dcommit
35
- This does a git-svn dcommit, with a twist: all changes in the diff
36
- will be squashed into a single commit, and the description of the commit
37
- is taken directly from the Rietveld description. This command also accepts
38
- arguments to "git diff", much like upload.
39
- Try "git cl dcommit --help" for more options.
40
-
41
- == Extra commands
42
- Print some status info:
43
- $ git cl status
44
-
45
- Edit the issue association on the current branch:
46
- $ git cl issue 1234
47
-
48
- Patch in a review:
49
- $ git cl patch <url to full patch>
50
- Try "git cl patch --help" for more options.
51
-
52
- vim: tw=72 :
@@ -1,52 +0,0 @@
1
- @echo off
2
- :: Copyright (c) 2009 The Chromium Authors. All rights reserved.
3
- :: Use of this source code is governed by a BSD-style license that can be
4
- :: found in the LICENSE file.
5
-
6
- setlocal
7
-
8
- :: This script will create a scheduled task to run chrome-update every day
9
- :: at the time you specify. This script expects to be live in
10
- :: depot_tools\latest.
11
- ::
12
- :: Usage: this-script <time to run task> <path to chrome trunk>
13
-
14
- set Out=%USERPROFILE%\chrome-update-task.bat
15
- set TaskTime=%1
16
- set Trunk=%~f2
17
-
18
- if not exist "%Trunk%" (
19
- echo Usage: %~n0 ^<time^> ^<c:\path\to\chrome\trunk^>
20
- echo ^<time^> is the time in HH:MM:SS format at which to run the task.
21
- echo Example: %~n0 02:00:00 c:\src\chrome\trunk
22
- goto :EOF
23
- )
24
-
25
- if not exist "%Out%" goto CreateScript
26
-
27
- echo WARNING: %Out% already exists.
28
- set Choice=
29
- set /P Choice=Overwrite file [Y/N]?
30
- if not "%Choice%"=="y" goto CreateTask
31
-
32
- :CreateScript
33
-
34
- echo.
35
- echo Creating %Out%
36
-
37
- echo>"%Out%" @echo off
38
- echo>>"%Out%" "%~dp0chrome-update.bat" "%Trunk%" --solution chrome.sln --target Debug --build-dir src/chrome ^> "%Trunk%\chrome-update-results.txt"
39
-
40
- :CreateTask
41
-
42
- echo.
43
- echo ***********************************************************************
44
- echo Creating a Scheduled Task to run chrome-update each day at %TaskTime%.
45
- echo The batch file being run will live at %Out%.
46
- echo.
47
- echo WARNING: The password you enter will be displayed in cleartext.
48
- echo If you're paranoid, you can enter blank here and then fix the password
49
- echo by editing the scheduled task manually from the Control Panel.
50
- echo ***********************************************************************
51
- echo.
52
- schtasks /create /tn chrome-update /tr "\"%Out%\"" /sc daily /st %TaskTime%
@@ -1,5 +0,0 @@
1
- @echo off
2
- setlocal
3
- :: This is required with cygwin only.
4
- PATH=%~dp0;%PATH%
5
- call python "%~dp0chrome-update.py" %*
@@ -1,91 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright (c) 2011 The Chromium Authors. All rights reserved.
3
- # Use of this source code is governed by a BSD-style license that can be
4
- # found in the LICENSE file.
5
-
6
- import os
7
- import re
8
- import subprocess
9
- import sys
10
- import urllib
11
-
12
- IS_WIN = sys.platform.startswith('win')
13
- BASE_URL = 'http://src.chromium.org/svn/trunk/tools/buildbot/scripts/'
14
- COMPILE_URL = BASE_URL + 'slave/compile.py'
15
- UTILS_URL = BASE_URL + 'common/chromium_utils.py'
16
-
17
-
18
- def Fetch(url, filename):
19
- if not os.path.exists(filename):
20
- urllib.urlretrieve(url, filename)
21
-
22
-
23
- def GetLastestRevision():
24
- """Returns the revision number of the last build that was archived, or
25
- None on failure."""
26
- url = 'http://build.chromium.org/buildbot/continuous/'
27
- if sys.platform.startswith('win'):
28
- url += 'win/'
29
- elif sys.platform.startswith('linux'):
30
- url += 'linux/'
31
- elif sys.platform.startswith('darwin'):
32
- url += 'mac/'
33
- else:
34
- # This path is actually win.
35
- pass
36
- url += 'LATEST/REVISION'
37
- text = urllib.urlopen(url).read()
38
- if text:
39
- match = re.search(r"(\d+)", text)
40
- if match:
41
- return int(match.group(1))
42
- return None
43
-
44
-
45
- def DoUpdate(chrome_root):
46
- """gclient sync to the latest build."""
47
- cmd = ["gclient", "sync"]
48
- rev = GetLastestRevision()
49
- if rev:
50
- cmd.extend(['--revision', 'src@%d' % rev])
51
- return subprocess.call(cmd, cwd=chrome_root, shell=IS_WIN)
52
-
53
-
54
- def DoBuild(chrome_root, args):
55
- """Download compile.py and run it."""
56
- compile_path = os.path.join(chrome_root, 'compile.py')
57
- Fetch(COMPILE_URL, compile_path)
58
- Fetch(UTILS_URL, os.path.join(chrome_root, 'chromium_utils.py'))
59
- cmd = ['python', compile_path] + args
60
- return subprocess.call(cmd, cwd=chrome_root, shell=IS_WIN)
61
-
62
-
63
- def main(args):
64
- if len(args) < 3:
65
- print('Usage: chrome-update.py <path> [options]')
66
- print('See options from compile.py at')
67
- print(' %s' % COMPILE_URL)
68
- print('\nFor more example, see the compile steps on the waterfall')
69
- return 1
70
-
71
- chrome_root = args[1]
72
- if not os.path.isdir(chrome_root):
73
- print('Path to chrome root (%s) not found.' % chrome_root)
74
- return 1
75
-
76
- rv = DoUpdate(chrome_root)
77
- if rv != 0:
78
- print('Update Failed. Bailing.')
79
- return rv
80
-
81
- DoBuild(chrome_root, args[2:])
82
- print('Success!')
83
- return 0
84
-
85
-
86
- if __name__ == "__main__":
87
- try:
88
- sys.exit(main(sys.argv))
89
- except KeyboardInterrupt:
90
- sys.stderr.write('interrupted\n')
91
- sys.exit(1)
@@ -1,200 +0,0 @@
1
- #!/usr/bin/env -S bash -e
2
- #
3
- # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4
- # Use of this source code is governed by a BSD-style license that can be
5
- # found in the LICENSE file.
6
- #
7
- # create-chromium-git-src
8
- #
9
- # Create and configure a local Chromium git repository.
10
- #
11
-
12
- GITSERVER="${GITSERVER:-git.chromium.org}"
13
- SVNSERVER="${SVNSERVER:-svn://svn.chromium.org/chrome}"
14
- TMP=".create_chromium_git_src.$$"
15
-
16
- function cleanup {
17
- rm -rf "${TMP}"
18
- }
19
-
20
- trap 'cleanup; echo Failure!; tput bel; exit 1' TERM QUIT HUP INT EXIT
21
-
22
- function get_email {
23
- # Get user email address.
24
- EMAIL=""
25
- while [ "x${EMAIL}" = "x" ]; do
26
- echo -n "Email address git should configure in your checkout: "
27
- read EMAIL
28
- if [ "x${EMAIL}" = "x${EMAIL%@*}" ]; then
29
- echo "Invalid email address (must contain @)!"
30
- EMAIL=""
31
- fi
32
- done
33
- echo -n "Using ${EMAIL} for email address... "
34
- sleep 1
35
- echo OK
36
- }
37
-
38
- # Verify we can write to particular directories.
39
- function check_dirs {
40
- if [ -d src ]; then
41
- echo "Found a src directory, do you already have a Chromium checkout?"
42
- exit 1
43
- fi
44
- }
45
-
46
- # Test git and git --version.
47
- function test_git {
48
- echo -n "Trying git... "
49
- local GITV="$(git --version)" || {
50
- echo "git isn't installed, please install it"
51
- exit 1
52
- }
53
-
54
- GITV="${GITV##* }" # Only examine last word (i.e. version number)
55
- local GITD=( ${GITV//./ } ) # Split version number into decimals
56
- if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then
57
- echo "git version is ${GITV}, please update to a version later than 1.6"
58
- exit 1
59
- fi
60
- echo "found git version ${GITV}"
61
- }
62
-
63
- # Test git svn and git svn --version.
64
- function test_git_svn {
65
- echo -n "Trying git-svn... "
66
- rm -rf "${TMP}"
67
- git clone git://github.com/git/hello-world.git "${TMP}" &>/dev/null &&
68
- local GITV="$(cd "${TMP}" && git svn --version)" || {
69
- echo "git-svn isn't installed, please install it"
70
- exit 1
71
- }
72
-
73
- GITV="${GITV#* version }" # git svn --version has extra output to remove.
74
- GITV="${GITV% (svn*}"
75
- local GITD=( ${GITV//./ } ) # Split version number into decimals
76
- if ((GITD[0] < 1 || (GITD[0] == 1 && GITD[1] < 6) )); then
77
- echo "git version is ${GITV}, please update to a version later than 1.6"
78
- exit 1
79
- fi
80
- echo "found git-svn version ${GITV}"
81
-
82
- echo "Testing git svn init..."
83
- (cd "${TMP}" && git svn init --username="${EMAIL}" --prefix=origin/ \
84
- -T trunk/src "${SVNSERVER}") &
85
- local pid="$!"
86
- { sleep 10 && kill "${pid}"; } &>/dev/null &
87
- wait "${pid}" &>/dev/null || {
88
- echo "Could not initialize repository, is SVN server ${SVNSERVER} correct?"
89
- echo "The supplied username and password may be incorrect."
90
- exit 1
91
- }
92
- }
93
-
94
- # Verify we can reach our main git URL.
95
- function test_git_url {
96
- echo -n "Testing Chromium git URL... "
97
- mkdir -p "${TMP}"
98
- (cd "${TMP}" &&
99
- rm -rf .git .gitignore &&
100
- git init &&
101
- git remote add origin git://"${GITSERVER}"/chromium.git &&
102
- git remote show origin) &>/dev/null &
103
- local pid="$!"
104
- { sleep 10 && kill "${pid}"; } &>/dev/null &
105
- wait "${pid}" &>/dev/null || {
106
- echo "timeout accessing Chromium git URL, is ${GITSERVER} correct?"
107
- exit 1
108
- }
109
- echo OK
110
- }
111
-
112
- # Grab a clone of the Chromium git repository.
113
- function cr_git_clone {
114
- echo "Grabbing Chromium git repository..."
115
- git clone git://"${GITSERVER}"/chromium.git src || {
116
- echo "git clone exited with error"
117
- echo "You should probably remove 'src' before retrying"
118
- exit 1
119
- }
120
- }
121
-
122
- # Configure the git repository to know about the upstream SVN server.
123
- function cr_git_svn_init {
124
- echo "Configuring upstream SVN..."
125
- (cd src && git svn init --username="${EMAIL}" --prefix=origin/ -T trunk/src \
126
- "${SVNSERVER}") || {
127
- echo "'git svn init' exited with error"
128
- exit 1
129
- }
130
- }
131
-
132
- # Initialize the SVN history in the repository, also sanity checks our upstream
133
- # SVN configuration.
134
- function cr_git_svn_fetch {
135
- echo "Fetching SVN history..."
136
- (cd src && git svn fetch && git pull) || {
137
- echo "'git svn fetch' exited with error"
138
- exit 1
139
- }
140
- }
141
-
142
- # Remaining configuration of the git repository:
143
- # - associate with codereview/rietveld
144
- # - set the repository's email address
145
- # - disable crlf munging
146
- # - grab a stock .gclient file
147
- function git_config {
148
- echo -n "Associating with Rietveld... "
149
- (cd src && git cl config http://src.chromium.org/svn/)
150
- echo OK
151
-
152
- echo -n "Configuring email address... "
153
- (cd src && git config user.email "${EMAIL}")
154
- echo OK
155
-
156
- echo -n "Disabling crlf munging... "
157
- (cd src && git config --global core.autocrlf false)
158
- echo OK
159
-
160
- echo -n "Creating a .gclient file... "
161
- gclient config http://src.chromium.org/svn/trunk/src
162
- echo OK
163
- }
164
-
165
- get_email
166
- check_dirs
167
- test_git
168
- test_git_svn
169
- test_git_url
170
- cr_git_clone
171
- cr_git_svn_init
172
- cr_git_svn_fetch
173
- git_config
174
-
175
- echo
176
- echo "A Chromium Git repository was created in 'src'."
177
- echo
178
- echo " To create a CL..."
179
- echo " Update: git pull && gclient sync"
180
- echo " Create and use a branch mychange: git checkout -q -b mychange origin"
181
- echo " Edit files and commit: git commit -a -v"
182
- echo " Upload CL: git cl upload"
183
- echo " Try a change: git try origin"
184
- echo " Commit a CL: git cl dcommit"
185
- echo " Switch to the trunk: git checkout trunk"
186
- echo " Delete a branch mychange: git branch -d mychange"
187
- echo
188
- echo " If while on a branch you need to switch back to the trunk..."
189
- echo " Switch to the trunk: git checkout trunk"
190
- echo " List all branches: git branch"
191
- echo " Switch to branch mychange: git checkout mychange"
192
- echo
193
- echo " Examining files and changes..."
194
- echo " Log with patches: git log -p"
195
- echo " Changes to DEPS: git log -p DEPS"
196
- echo " View latest commit: git cat-file commit HEAD"
197
- echo
198
- echo "You should run: gclient sync"
199
- echo
200
- trap cleanup EXIT