git - 如何从git获取指定标签版本的Chromium代码?

标签 git chromium

我只需要指定版本的 Chromium 的代码,例如 r69297,这是 Chrome 的最新开发版本。 我使用 git,所以我按照这里的说明操作: http://code.google.com/p/chromium/wiki/UsingGit 然而,在我同步所有代码并查看提交日志后,我找不到这个修订版! 然后我想到了标签,并在这里搜索。 How to use git to checkout a specified version of Webkit? 在这里我找到了,但是在按照所有步骤进行操作之后,等待了很长时间,我仍然一无所获。 chromium 的 git 存储库是否保留标签信息?我怎样才能得到它们? 谢谢

最佳答案

问这个问题的时候,Chromium 使用的是 SVN。现在,git 是主要的 VC 系统,所以我将使用 git tags/hashes 而不是 r#### revisions。

在这个回答中,我假设您已经设置了构建 Chromium 的先决条件(包括初始检查)。如果您没有那个,请按照 http://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html 上的教程进行操作。在继续之前。您可以跳过 gclient sync 步骤,因为您将在下面的步骤中替换依赖项。

场景:我想在最新稳定的 Chromium 版本之上应用补丁。要查找最新的稳定版本,只需访问 https://omahaproxy.appspot.com/ .根据该页面,最新版本是 38.0.2125.104。如果您想查看上一个/下一个版本,请访问 http://blink.lc/chromium/refs/有关标签的概述。此标签列表包括未发布的版本,例如38.0.2125.106(当新补丁应用到由第三个数字标识的基线之上时,最后一个内部版本号增加)。

# 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

关于git - 如何从git获取指定标签版本的Chromium代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4481803/

相关文章:

javascript - 原子包: hide developer keys

qt - 在 Linux 上为 Qt5 WebEngine 启用 mp4/mpeg4/avc 支持

javascript - 如何打开 chrome ://apps 中列出的浏览器应用程序

javascript - 为什么这个函数调用的执行时间会发生变化?

git - git远程推送是如何工作的?

android - git克隆后的Gradle错误

git - 我可以修改 git-add 的 **默认** hunk 大小吗?

git - git remote prune、git prune、git fetch --prune 等之间有什么区别

android - 在基于Chromium的 float WebView中播放YouTube视频时出现音频滞后或断断续续的情况

c++ - 轻松构建 Chromium 基础 (libchrome) 库