tags:

views:

396

answers:

3

Thank you. From the link http://trac.webkit.org/wiki/UsingGitWithWebKit, there are these 3 steps in checking out Webkit using git.

Which step i need to change to specify checkout a right version of Webkit for chromium?

Thank you.

git clone git://git.webkit.org/WebKit.git WebKit
cd WebKit
git svn init -T trunk http://svn.webkit.org/repository/webkit
git update-ref refs/remotes/trunk origin/master
git svn fetch
A: 

It doesn't look to me like you have to also track the Subversion repository, so if all you are really interested in is getting some version of WebKit from the past, this will do that:

git clone git://git.webkit.org/WebKit.git WebKit
cd WebKit
git checkout <tag>

Where <tag> is the tag applied to the version you care about. I can't tell you what version you want, but you can get a list of tags using git tag. If one doesn't match the version you want, find out what the SHA1 hash is for the revision you want and specify that instead of a tag name.

Steve Madsen
i tried "git clone git://git.webkit.org/WebKit.git WebKitcd WebKit", but I get nothing with i did 'git tag'.and then I add "git svn init -T trunk http://svn.webkit.org/repository/webkitgit update-ref refs/remotes/trunk origin/mastergit svn fetch"but I still get nothing with i do 'git tag'.but I see a bunch of r47649 = a3cf5d9ebe3db905422842de2c126096391f69f9r47650 = 8660bd7d03ecca29203e449e7aecf3c86c5fc995r47651 = ac463b98f72507b90ce3647b08b0a29c4cabaaafr47652 = 5c5efb72568a776e5fb16f53bdd11851cc6e5885r47653 = 1b2f26b353931271f1e9637dd492013e33949e1a
hap497
A: 

In the Chromium tree you'll find a file called DEPS. The 4th line of that file will specify the WebKit revision for that Chromium tree.

Note that Chromium rolls WebKit daily (except weekends).

agl
Thanks. So I want to keep update Webkit (via git-svn) as Chromium updates its WebView dependency on a particular. so if I do what 'Steve Madsen' suggestion, I will another 'git checkout <new tag>'? Basically I would like to keep Webkit change s history and changes/history I made locally.
hap497
A: 
git fetch origin <branch name>
git checkout <branch name>
git pull --tags # pulls all tags from the remote repo
git checkout <tag name> # checks out that tag from the remote repo

This will pull down the tag from the git repo and then checkout that tag into your working copy. This is assuming of course that the git repo has these tags or branches to fetch and checkout.

If the git repo does not have those tags you will have to use the git svn commands to do it.

$ REF=$(git svn find-rev r<revision>) git checkout $REF
$ git checkout -b <branchname> # if you want to create  branch from this commit
$ git tag <tagname> # if you want to create a tag from this commit

git svn find-rev finds the git commit ref for the svn revision specified.

Jeremy Wall
I should note that the git svn method above only works if you have tracked the svn repo.
Jeremy Wall
Thank you. I did what you suggested.$ REF=$(git svn find-rev r<revision>) git checkout $REF$ git checkout -b <branchname>and then, I did a 'git svn rebase' ( i was trying to sync up the trunk of the svn repository, but I forget to do 'get checkout -b master before I do 'git svn rebase'. And I get this now: git checkout masterAlready on 'master'Your branch is ahead of 'origin/master' by 146 commits.I made no changes in my git svn repository, howcome i said i am ahead by 146 commits. And how can I fix it?Thank you.
hap497
anytime you rebase you rewrite the history of the git repository. Most likely you squashed or removed commits from the history so you're repository history no longer looks like the remote one and git gets confused. Rebase should only be used to modify history for commits you have made but not published. Doing a rebase when not on a particular branch may have some really strange behaviour I don't know. When you checkout a commit rev you aren't on a branch and you aren't on master. git rebase may have wiped out all the commits after the commit you checked out. but that's a guess.
Jeremy Wall
Thank you for your help.
hap497