Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to get code of specified tag version of Chromium from git?

Tags:

git

chromium

i just need code of specified version of Chromium like r69297 which is the latest dev version of Chrome. i use git so i follow the instruction here: http://code.google.com/p/chromium/wiki/UsingGit however, after i sync all the code, and review the commit log, i can't find this revision! then i thought about tag, and searched here. How to use git to checkout a specified version of Webkit? here i found, but after follow all the steps, and wait for quite a long long time, i still get nothing. does the git repository of chromium keep the tag information? how can i get them? thx

like image 823
ayanamist Avatar asked Dec 19 '10 05:12

ayanamist


People also ask

How do I pull a tag in git?

In order to checkout a Git tag, use the “git checkout” command and specify the tagname as well as the branch to be checked out. Note that you will have to make sure that you have the latest tag list from your remote repository.

What is tag version in git?

Tagging is generally used to capture a point in history that is used for a marked version release (i.e. v1. 0.1). A tag is like a branch that doesn't change. Unlike branches, tags, after being created, have no further history of commits. For more info on branches visit the git branch page.

Which git command gives tags to the specified commit?

In order to create a Git tag for a specific commit, use the “git tag” command with the tag name and the commit SHA for the tag to be created. If you want to create an annotated tag for a specific commit, you can use the “-a” and “-m” options we described in the previous section.


1 Answers

When the question was asked, Chromium used SVN. Nowadays, git is the primary VC system, so I will use git tags/hashes instead of r#### revisions.

In this answer, I assume that you have already set up the pre-requisites for building Chromium (including an initial checkout). If you don't have that one, follow the tutorial at http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html before continuing. You can skip the gclient sync step because you'll replace the dependencies anyway in the steps below.

Scenario: I want to apply a patch on top of the latest stable Chromium version. To find out the latest stable build, just visit https://omahaproxy.appspot.com/. According to that page, the latest version is 38.0.2125.104. If you want to see previous/next releases, visit http://blink.lc/chromium/refs/ for an overview of tags. This list of tags includes unreleased versions, e.g. 38.0.2125.106 (the last build number increases when new patches are applied on top of the baseline that is identifier by the third number).

# Inside chromium/src/
git fetch origin 38.0.2125.106

# Create a new branch "my_stable_branch" that is based on the just-fetched HEAD.
git checkout -b my_stable_branch FETCH_HEAD

# ... apply the patch ...
# (e.g. by editing the files)
# (e.g. by using git cherry-pick [commit id] )
# (e.g. by using git checkout [commit id] [file path] )

# Commit changes (assuming that you want to keep track of your changes)
git commit -va

# Now synchronize the dependencies to the current branch
gclient sync --with_branch_heads  # --jobs 16  if you wish to use parallelism

# Now compile the release build. The output will be stored in src/out/Release.
ninja -C out/Release chrome chrome_sandbox
like image 132
Rob W Avatar answered Nov 04 '22 08:11

Rob W