UsingNewGit
This page has been moved to the http://code.google.com/p/chromium/wiki/UsingGit workflow page. |
► Sign in to add a comment
Search
|
UsingNewGit
This page has been moved to the http://code.google.com/p/chromium/wiki/UsingGit workflow page. |
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.
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.
@xhw: gclient sync --force --rev #123
Note: For Debian-based Linux users, you may have to download and install git-svn: sudo apt-get install git-svn
Is git-svn needed for non-commiters?
> Is git-svn needed for non-committers. No, it should not be needed.
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".
Python 2.5 or higher should be added to the prerequisites:
$ gclient config http://git.chromium.org/chromium/src.git --git-deps
SyntaxError?: invalid syntaxwhen 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/
src.git just svn-trunk,no branch mirror,so how to check out the stable branch?
The following works for read-only git-svn integration:
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.
Just figured out how to init git-svn of a third_party directory. Using sdch/open-vcdiff as an example:
Ad "Setting up read-only git-svn" -- make sure you are in the src/ directory.
I did the following to init git-svn for third_party/icu:
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?
If you get any dependency errors during gclient sync (like 'nss' or 'gtk+-2.0'), run build/install-build-deps.sh
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.
[email protected] wrote:
Here is the command I used: gclient sync --force --revision <GIT_COMMIT_SHA>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?
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 \
That might explain it; not sure.
Stefan
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:
you mention but this doesn't seem to be of any help either.Thank you, George
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?
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
the preferred git host is now chromium.googlesource.com now, right?
Yes, that's right; I have updated the page.
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.
Should there be a banner at the top announcing UsingGitSubmodules as the new, improved way?
The latest code I have like this does not have scroll in settings page? Is it getting the right source?
For lkgr there should be link over https: "https://chromium-status.appspot.com/lkgr"
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)
Trouble shooting about src/build/install-build-deps.sh. before running src/build/install-build-deps.sh, ensure curl is installed.