2

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
hap497
  • 154,439
  • 43
  • 83
  • 99

3 Answers3

1
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
  • 23,907
  • 5
  • 55
  • 73
  • I should note that the git svn method above only works if you have tracked the svn repo. – Jeremy Wall Aug 25 '09 at 05:12
  • Thank you. I did what you suggested. $ REF=$(git svn find-rev r) git checkout $REF $ git checkout -b 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 master Already 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 Aug 27 '09 at 06:32
  • 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 Aug 27 '09 at 13:12
0

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
  • 13,465
  • 4
  • 49
  • 67
  • i tried "git clone git://git.webkit.org/WebKit.git WebKit cd WebKit", but I get nothing with i did 'git tag'. and then I add "git svn init -T trunk http://svn.webkit.org/repository/webkit git update-ref refs/remotes/trunk origin/master git svn fetch" but I still get nothing with i do 'git tag'. but I see a bunch of r47649 = a3cf5d9ebe3db905422842de2c126096391f69f9 r47650 = 8660bd7d03ecca29203e449e7aecf3c86c5fc995 r47651 = ac463b98f72507b90ce3647b08b0a29c4cabaaaf r47652 = 5c5efb72568a776e5fb16f53bdd11851cc6e5885 r47653 = 1b2f26b353931271f1e9637dd492013e33949e1a – hap497 Aug 22 '09 at 02:30
0

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
  • 1,129
  • 5
  • 6
  • 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 '? Basically I would like to keep Webkit change s history and changes/history I made locally. – hap497 Aug 22 '09 at 00:02