My favorites | Sign in
v8
Project Home Downloads Wiki Issues Source Code Search
Search
for
UsingGit  
This page describes how to use Git mirror of V8 repository.
Updated Sep 8, 2014 by jochen@chromium.org

Git repository

V8's trunk and bleeding_edge branches are mirror to git at https://chromium.googlesource.com/external/v8.git

V8's bleeding_edge branch has also an official git mirror on github: http://github.com/v8/v8.

Prerequisites

Make sure git and git-svn are installed. To install using apt-get:

apt-get install git git-svn

You will also need to install depot tools.

How to start

Cloning v8's bleeding_edge branch, setting up git svn, and getting all dependencies can be done using:

fetch v8

It's also possible to use git cl from a checkout created via fetch v8. If you don't need access to other branches, this setup is enough for day to day development.

Staying up-to-date

On your development branch:

git pull --rebase origin

Sometimes dependencies of v8 are updated. You can synchronize those by running

gclient sync

For project members

Full SVN checkout

This section describes an alternate way to get the source code. Following these instructions makes sure you'll get a clone of the full SVN repository including all branches and history. You'll need this to perform pushes to trunk.

  1. Make sure you have git and git-svn installed.
  2. Fetch the sources:
  3. git svn clone --stdlayout --branches=branches/experimental --branches=branches --prefix=svn/ --username=YOUR_ACCOUNT@chromium.org https://v8.googlecode.com/svn v8.git
    This process takes a loooong time (a few hours). It might fail at some point; if it does you can use the following command to tell it to continue where it left off:
    git svn fetch
  4. Make sure you're on the master branch and switch its svn parent to bleeding_edge:
  5. git reset --hard svn/bleeding_edge
  6. Install depot tools and put them in your $PATH
  7. You might want to edit your ~/.bashrc to set up that $PATH on subsequent logins.
  8. Configure git-cl:
  9. git cl config http://v8.googlecode.com/svn
  10. Install required dependencies:
  11. make dependencies

Staying up to date

git checkout master
git svn rebase
git rebase master your_feature_branch

If any of the build dependencies has changed, you might have to update them:

make dependencies

Sending code for reviewing

First, you need to configure git-cl, thankfully it’s done magically by a single command:

git cl config http://v8.googlecode.com/svn

Then do

git cl upload

Committing

Update your branch using git-svn:

git svn rebase

Then commit using

git cl dcommit

Do not use git svn dcommit for committing, as it lacks git-cl's magic. Pro tip: you can use git cl rebase for updating (it's an alias for git svn rebase), so you'll never have to use any git svn ... command at all.

Try jobs

Creating a try job from codereview

  1. Upload a CL to rietveld.
  2. git cl upload
  3. Try the CL by sending a try job to the try bots like this:
  4. git cl try
  5. Wait for the try bots to build and you will get an e-mail with the result. You can also check the try state at your patch on codereview.
  6. If applying the patch fails you either need to rebase your patch or specify the v8 revision to sync to:
  7. git cl try --revision=1234

Creating a try job from a local branch

  1. Commit some changes to a git branch in the local repo.
  2. Try the change by sending a try job to the try bots like this:
  3. git try
  4. Wait for the try bots to build and you will get an e-mail with the result. Note: There are issues with some of the slaves at the moment. Sending try jobs from codereview is recommended.

Useful arguments

The revision argument tells the try bot what revision of the code base will be used for applying your local changes to. Without the revision, our LKGR revision is used as the base (http://v8-status.appspot.com/lkgr).

git try --revision=1234

To avoid running your try job on all bots, use the --bot flag with a comma-separated list of builder names. Example:

git try --bot=v8_mac_rel

Viewing the try server

http://build.chromium.org/p/tryserver.v8/waterfall

Access credentials

If asked for access credentials, use your @chromium.org email address and your generated password from googlecode.com.

Comment by Mitchell...@technologyonecorp.com, Apr 10, 2012

mitchmacwork:re2 mitchr$ git clone git://github.com/v8/v8.git v8 && cd v8 Cloning into v8... github.com[0: 207.97.227.239]: errno=Connection refused fatal: unable to connect a socket (Connection refused)

Comment by sawc...@gmail.com, May 7, 2012
Comment by project member mathias@qiwi.be, Jul 5, 2012

The git-cl link 404s.

Comment by david.go...@gmail.com, Aug 14, 2012

Awesome

Comment by jstan...@gmail.com, Oct 19, 2013

http://www.chromium.org/developers/how-tos/depottools may be the most up-to-source for git-cl (it's hard to tell for sure.)

Comment by METHEC...@gmail.com, Jan 11, 2014
Comment by hoanganh...@gmail.com, Feb 8, 2014

a

Comment by mahatmaw...@gmail.com, Jul 17, 2014

i like it

Comment by mlisaove...@gmail.com, Aug 28, 2014

Is there a depot_tools build that will run on Android?

Comment by shawncao...@gmail.com, Sep 15, 2014

I'm stuck here. Anyone can help? I'm using RHEL5

[root@vmgr02 V8]# fetch v8 Running depot tools as root is sad. Traceback (most recent call last):

File "/u01/git-2.1.0/V8/depot_tools/fetch.py", line 21, in ?
import json
ImportError?: No module named json


Sign in to add a comment
Powered by Google Project Hosting