2007-06-15
Viewing Firefox CVS changes via gitweb
Following on from my previous post about using git to track the Firefox CVS repository, I've installed 'gitweb' to allow browsing the repository. The URL to access it is: http://www.double.co.nz/cgi-bin/gitweb.cgi
This is quite a nice way to see diffs for what has changed recently in the CVS tree for the time period between when my git import script runs. Unfortunately you don't get the original CVS comments for the commit.
You can also now clone or pull from the repository using the 'http' protocol as well as the 'git' protocol:
# Git protocol
git clone git://double.co.nz/git/firefox.git
# HTTP protocol
git clone http://double.co.nz/git/firefox.git
In the comments to the last post, Alex asked for advice on how to get git on Mac OS X and MozillaBuild on Windows users.
On Mac OS X I installed 'git-core' using macports:
sudo port install git-core
Windows is a bit trickier as most people who have been following git know. The best approach at the moment is to use cygwin. Git is available in cygwin or you can install it from source. Make sure you get version 1.5.1 or greater. What I do is run all my git commands from cygwin and use the msys based MozillaBuild shell for building and other things. It's not ideal but it has worked reasonably well for me. Another option might be git-mingw but I've not tried it and don't know how stable it is.
Also in the comments, jmdesp asked about using the git repository to track regressions. I have a script that updates the repository about every 6 hours. You could probably use this to track down the six hour window where the problem occurred, and use git to see the files that were changed in the commit. You can use git to move forward and back commits and try builds. Here's an example workflow:
# Get the repository
git clone git://double.co.nz/git/firefox.git regression
cd regression/mozilla
...create .mozconfig...
make -f client.mk build
...test...
# Go back one commit
git checkout HEAD~1
make -f client.mk clean
make -f client.mk build
...test...
# Go back another commit
git checkout HEAD~1
make -f client.mk clean
make -f client.mk build
...test...
# Go back 3 more commits
git checkout HEAD~3
make -f client.mk clean
make -f client.mk build
...test...
# Restore back to the most recent commit
git checkout HEAD
The number following the tilde in HEAD~1 is the number of commits to go back. You can also use 'git log' to see the commit id of each commit and jump directly to that:
git log
...Commit c2148196de6a112982e273b5c469a9f763a1fa8b...
git checkout c2148196de6a112982e273b5c469a9f763a1fa8b