Sunday, January 24. 2010Back to the buildfarm+git futureTrackbacks
Trackback specific URI for this entry
No Trackbacks
Comments
Display comments as
(Linear | Threaded)
Why not just have one master copy from which you setup alternates? If you dont change that "master" copy you dont have to worry about any dataloss problems?
I'm not sure if you've come across this already, but git keeps recently used data (files, commit objects, etc.) around in separate files for quick access, but every so often invokes a 'garbage collector' that scoops up the individual files into compressed "pack files". By default, it uses only minimal compression to get out of your way quickly so you can get back to what you were doing, but if you run "git gc --aggressive" it'll squash everything down to a remarkable degree. I recently cloned an SVN repository with "git svn"; it downloaded 5GB of data over the network, but after "git gc --aggressive" it only took up ~100MB on the disk.
Another thing to know about is that when you "git clone" a repository on the local disk to another repository on the local disk, git will automatically hard-link the "pack files" in the original repository into the new one. Since git's pack files are never modified, only created and deleted, this means that you can have multiple local trees that are even cheaper than CVS checkouts, since git doesn't store accounting information in every subdirectory.
The last point is very interesting - I didn't know that. Does it do that hard linking on Windows, where 11 of my buildfarm members run?
Anyway, it's good to know that I won't be using huge amounts more space in my development area.
Just wanted to mention that you could also make shallow clones that don't include the entire history. Check out the --depth option of git clone.
As any git clone has the entire history, you can checkout from this local copy any tag or branch (or commit) you want to work with. So for the 15 branches case that's actually a win, one clone and there you go.
You might want to do VPATH builds in order to keep the source tree clean and allow for easy checkout'ing. I've yet to work out the details but I think it's another use case where git is better.
"git checkout" switches the branch on the working tree. I need to have working trees of several branches simultaneously . So unless I'm missing something each of those will need its own clone.
But all of those can share most of their data inbetween them so you only have to store the local changes in each checkout. Simply use the "--reference" option to git clone.
The only thing you should not do then is to delete things from that "local master" repository which are also used on the "secondary clones".
So many choices!
The alternates solution is probably the most convenient, but you can make multiple checkouts of the same repo with --work-tree. For example:
mkdir $BRANCH.d GIT_INDEX_FILE=$BRANCH.index git --work-tree $BRANCH.d checkout $BRANCH
Git seems to be nice to you, but what about Mercurial? It is much more smaller and (maybe) as powerfull as Git.
It is not my choice to make. I'd be quite happy to try Mercurial, but the PostgreSQL community appears to have decided that Git is its preferred new SCM system, and the buildfarm client needs to be able to use whatever the community is using.
|
My Links etcCalendar
QuicksearchArchivesCategoriesBlog Administration |
|||||||||||||||||||||||||||||||||||||||||||||||||