My favorites | Sign in
Project Home Downloads Wiki Issues Code Search
Search
for
UsingNewGit  
Updated Apr 8, 2013 by [email protected]

This page has been moved to the http://code.google.com/p/chromium/wiki/UsingGit workflow page.

Comment by [email protected], Jun 15, 2011

It would be great if branches will be mirrored from svn to git. Checking out the stable (from release calendar) is a little difficult now.

Comment by [email protected], Sep 8, 2011

What's the best way to sync back to an earlier commit? For example, the head revision is broken and I need to sync to one week ago. Looks like "gclient sync" always sync to latest.

Comment by [email protected], Sep 28, 2011

@xhw: gclient sync --force --rev #123

Comment by [email protected], Oct 14, 2011

Note: For Debian-based Linux users, you may have to download and install git-svn: sudo apt-get install git-svn

Comment by [email protected], Nov 23, 2011

Is git-svn needed for non-commiters?

Comment by [email protected], Dec 8, 2011

> Is git-svn needed for non-committers. No, it should not be needed.

Comment by [email protected], Dec 16, 2011

What's the current recipe for synchronizing back to an earlier revision? gclient sync --force --revision 123 fails if you have other solutions (like cros_deps), saying you must specify "src@123". But --revision src@123 generates an error about "needed a single revision".

Comment by [email protected], Dec 22, 2011

Python 2.5 or higher should be added to the prerequisites:

$ gclient config http://git.chromium.org/chromium/src.git --git-deps

File "/Users/rdsmith/Sandboxen/depot_tools/gclient.py", line 1455
jobs = 1 if sys.platform == 'cygwin' else 8
^
SyntaxError?: invalid syntax

Comment by [email protected], Feb 5, 2012

when I run gclient on Windows 7 I get this error runing come a Windows command prompt. What am I doing wrong?

D:\cygwin\home\las\dev\depot_tools>gclient Installing python ... svn: This client is too old to work with working copy 'D:\cygwin\home\las\dev\de pot_tools'. You need to get a newer Subversion client, or to downgrade this working copy. See http://subversion.tigris.org/faq.html#working-copy-format-change for details. ... Failed to checkout python automatically. Please visit http://python.org to download the latest python 2.x client before continuing. You can also get the "prebacked" version used at http://src.chromium.org/svn/trunk/tools/third_party/

Comment by [email protected], Feb 6, 2012

src.git just svn-trunk,no branch mirror,so how to check out the stable branch?

Comment by [email protected], Feb 7, 2012

The following works for read-only git-svn integration:

git svn init --prefix=origin/ -T trunk/src https://src.chromium.org/svn
git config svn-remote.svn.rewriteUUID 0039d316-1c4b-4281-b951-d872f2087c98
git config svn-remote.svn.rewriteRoot svn://svn.chromium.org/chrome
git config svn-remote.svn.fetch trunk/src:refs/remotes/origin/master
git svn fetch
Comment by [email protected], Feb 14, 2012

Thanks rdsmith. That python version error was bit cryptic error message to guess, since i am not familiar with python. Upgrading the python to 2.6 resolved the issue.

Comment by [email protected], Apr 3, 2012

Just figured out how to init git-svn of a third_party directory. Using sdch/open-vcdiff as an example:

(in directory src/sdch/open-vcdiff)
git svn init --prefix=origin/ -T trunk http://open-vcdiff.googlecode.com/svn 
git config svn-remote.svn.fetch trunk:refs/remotes/origin/master
git svn fetch
Comment by [email protected], Apr 11, 2012

Ad "Setting up read-only git-svn" -- make sure you are in the src/ directory.

Comment by [email protected], Apr 25, 2012

I did the following to init git-svn for third_party/icu:

(in directory src/third_party/icu)
git svn init --prefix=origin/ -T trunk/deps/third_party/icu46 svn://svn.chromium.org/chrome
git config svn-remote.svn.fetch trunk/deps/third_party/icu46:refs/remotes/origin/master
git svn fetch

But git svn info shows: Unable to determine upstream SVN information from working tree history

How should I init git-svn for third_party/icu?

Comment by [email protected], May 23, 2012

If you get any dependency errors during gclient sync (like 'nss' or 'gtk+-2.0'), run build/install-build-deps.sh

Comment by [email protected], Jul 28, 2012

Found that 'apt-file search $FILE' is really helpful when resolving dependencies as install-build-deps.sh is not complete and does not contain everything to build fresh on a newly installed Ubuntu 12.04 LTS system.

Comment by [email protected], Aug 7, 2012

[email protected] wrote:

What's the current recipe for synchronizing back to an earlier revision? gclient sync --force --revision 123 fails if you have other solutions (like cros_deps), saying you must specify "src@123". But --revision src@123 generates an error about "needed a single revision".
Here is the command I used: gclient sync --force --revision <GIT_COMMIT_SHA>

Comment by [email protected], Oct 2, 2012

I did the instructions in "Setting up git-svn (for committers / SVN accounts)". I gave up on git svn init --prefix=origin/ -T trunk/src svn://svn.chromium.org/chrome after 14 (fourteen!) hours (from my desktop at the office). Is it supposed to be so slow? Can this be skipped and still be able to commit?

Comment by [email protected], Oct 2, 2012

You can likely still commit through the commit queue, but you won't be able to dcommit.

By any chance, did you skip this step during setup?

ln .git/svn/refs/remotes/origin/git-svn/.rev_map.4ff67af0-8c30-449e-8e8b-ad334ec8d88c \

.git/svn/refs/remotes/origin/git-svn/.rev_map.0039d316-1c4b-4281-b951-d872f2087c98

That might explain it; not sure.

Stefan

Comment by [email protected], Oct 4, 2012

In windows I'm not able to use

"safesync_url": "http://chromium-status.appspot.com/lkgr",

When I add the above line in .gclient then gclient sync just does nothing or prints this:

depot_tools\git_bin\bin\perl.exe: WFSO timed out

and I have to press Ctrl+C after some idle time.

It only works with this line instead:

"safesync_url": "",

I have created the shortcut:

"src\.git\svn\refs\remotes\origin\git-svn\.rev_map.0039d316-1c4b-4281-b951-d872f2087c98"
you mention but this doesn't seem to be of any help either.

Thank you, George

Comment by [email protected], Oct 27, 2012

How do you set up third party projects that don't have a subversion repo? I want to change something in third_party/cros_system_api and I see that all the code reviews are done on gerrit. But how do I set up gerrit without repo?

Comment by [email protected], Oct 27, 2012

You don't need repo to interface with gerrit. You should refer to the public gerrit docs, but you can push a change to gerrit with a git command similar to this:

$ push ssh://gerrit.chromium.org:29418/external/third_party/cros_system_api refs/heads/work_branch

Stefan

Comment by [email protected], Dec 13, 2012

the preferred git host is now chromium.googlesource.com now, right?

Comment by [email protected], Dec 13, 2012

Yes, that's right; I have updated the page.

Comment by [email protected], Dec 23, 2012

I tried to compile the source code with Android APK format. But this browser APK doesn't contain any Setting page. How can I enable this feature in my building environment. Thanks.

Comment by [email protected], Feb 1, 2013

Should there be a banner at the top announcing UsingGitSubmodules as the new, improved way?

Comment by [email protected], Feb 7, 2013

The latest code I have like this does not have scroll in settings page? Is it getting the right source?

Comment by [email protected], Feb 14, 2013

For lkgr there should be link over https: "https://chromium-status.appspot.com/lkgr"

Comment by bratell%[email protected], Feb 25, 2013

A few comments on the content in the Contributing section:

> git branch mywork origin

The last argument of git branch is a branch, not a remote, so it was probably intended to be origin/master

> git commit -a -v

git commit -a (commit everything locally modified) is considered bad and wrong usage of git and it doesn't leverage git's strengths. Instead you should manually add files, lines or code chunks using other commands and then just do git commit. With "git gui" or "git add -p" or whatever tool you favour you can easily pick exactly what you want to commit, something that has historically been tricky in other code versioning systems (and git commit -a was probably added to make it easy for those to migrate)

Comment by [email protected], Mar 15, 2013

Trouble shooting about src/build/install-build-deps.sh. before running src/build/install-build-deps.sh, ensure curl is installed.


Sign in to add a comment
Powered by Google Project Hosting