How to get the code of the specified version of the Chromium tag from git?

I just need the code for the specified version of Chromium, such as r69297, which is the latest version of the Chrome browser. I use git, so I follow the instructions here: http://code.google.com/p/chromium/wiki/UsingGit however, after I synchronize all the code and look through the commit log, I can not find this revision! then I thought about the tag and searched it here. How to use git to verify the specified version of Webkit? I found here, but after all the steps and waiting for a long, long time, I still get nothing. git chrome repository store tag information? how can i get them? THX

+6
git chromium
source share
2 answers

When a question was asked, Chrome used SVN. Git is currently the main VC system, so I use git tags / hashes instead of r #### revisions.

In this answer, I assume that you have already created the prerequisites for creating Chromium (including the initial check). If you don’t have one, follow the instructions of 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 will still replace the dependencies in the following steps.

Scenario: I want to apply a patch on top of the latest stable version of Chromium. To find out the latest stable build, just visit https://omahaproxy.appspot.com/ . According to this 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 tag list includes unreleased versions, for example. 38.0.2125.106 (the last build number increases when new fixes are applied over the baseline, which is the identifier for 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 ... # (eg by editing the files) # (eg by using git cherry-pick [commit id] ) # (eg 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 
+12
source share

Branches

If you cannot find a specific commit, I would check if it is in a branch other than "master". When you first clone a repository, you only get a "leading" branch. You can run the following to check the branch available in the remote Chromium repository:

 git branch new-local-branch origin/some-remote-branch git checkout new-local-branch 

Obviously, use the correct name for the remote branch and call the local branch something logical.

Tags

When you clone a Git repository, you should get all of its tags by default. You can get a list of all defined tags by running git tag or git tag -l .

If you do not see any tags, try them explicitly:

git fetch --tags

Once you have the tag you want, check it out to start using this version of the code base:

git checkout <name of tag>

+1
source share

All Articles