Archive for August 2005

 
 

company picnic

I’m in San Francisco this week, well Sunday thru to Wednesday actually, to do some face-to-face with the people I work with. It was a good time to schedule the meeting as the company picnic was today.

I had a great time, the new office manager CD did an excellant job planning the event – the food was great and everyone seemed to be really enjoying themselves. The fun part was watching all the new parents show off the babies.

I loved meeting even more people that I’ve only dealt with online, love putting faces and background to the different people. Later a pretty high-energy game of ultimate frisbee was started and it was tough not joining but I think the combination of being out-of-shape and the ground being not very level proved that my choice to just watch was probably a wise one :) I’m sure tomorrow there will be plenty of people with very sore muscles at work.

I’ll probably post some more tomorrow after I’ve been at work and after I’ve seen the new office layout.

a best friend is …

A best friend is someone who can walk up and take a bite out of your chicken sandwich and knows you won’t mind

A best friend is someone who will walk up to you, smile, and then stink up the room all the while giving you a look that says “like you wouldn’t do the same”

A best friend is someone who can visit at anytime when you are in any mood and you will feel happier

A best friend is someone who you can look at and see what kind of mood they are in just by the expression on their face

A best friend is someone who always comes back even after you have been mean to them

I will be missing my best friend for a long long time — I hope she has found a nice warm spot to relax and take a nap in.

the subversion of bonsai

Over the last couple of nights I’ve been trudging thru some code, mostly in perl, to allow bonsai to work with Subversion repositories. All in all pretty fun stuff.

The first thing I did was kind of a sanity check to see if svn commit data has all of the information that bonsai expects — I wanted to see if I would need to generate any information required. To determine this I took a look at bonsai’s dolog.pl and rebuildcvshistory.cgi — both populate the files and checkins tables in the bonsai database.

dirs table

Column Type Comment
id Integer Primary key
dir VarChar(255) directory (relative to repository)

files table

Column Type Comment
id Integer Primary key
file VarChar(255) filename (filename only – does *not* contain path)

checkins table

Column Type Comment
type Enum ‘Change’, ‘Add’, ‘Remove’
ci_when DateTime Timestamp of the revision
repositoryid Integer Foreign Key (FK) into repositories table
dirid Integer FK into dirs table
fileid Integer FK into files table
revision VarChar(32) revision identifier
stickytag VarChar(255) tag identifier
branchid Integer FK into branches table
addedlines Integer number of lines added for this revision
removedlines Integer number of lines removed for this revision
descid Integer FK into descs table

Now, while I haven’t dumped all of the tables, the above should give you a feel for how it’s structured. What is interesting to note is that while the checkins table has columns for branch and even stickytag, they don’t seem to be populated.

The heart of the bonsai system is the checkins table shown above where each row holds the information for each unique revision of each file. When this table is populated from CVS the rcs file list is crawled (all of the ,v files you see if you look at an actual CVS repository) and rlog is run on each file to pull it’s revision history which is inserted into the table.

With SVN it is a little bit different – not much, but still different. SVN uses atomic commits so multiple files can be included for each revision and given that you can rename and move files and directories, you end up with an interesting design hitch: Do you use svn list to return the list of files and directories in the root of the SVN repository and walk that list using svn log or do you use svn log on the root of the SVN repository and as part of the walk thru the revision history you will get all files and directories.

Now for the part of bonsai that is updating the tables for each new checkin it’s kind of a moot point (still a fun point, but made moot by how SVN does it’s hooks.) During the post-commit hook you get the repository and revision number so it really makes it a no-brainer to use the svn log command and parse the info into checkins table insertions for each file touched.

For the part of bonsai that does the initial building I can see it going either way but currently I’m leaning towards the svn log method simply because that would allow me to have a common svn log parser routine. Code reuse is a Good Thing :)

I still need to chew it over in my head but so far I haven’t seen any show stoppers, only a couple of questions that need working out. One of the questions is that by doing it the svn log way it changes how bonsai works with SVN from how it works with CVS. Not that I consider that a “bad” thing – just making note of it.

Hmm, this has turned out to be a nice rambling post so let me end it now and I’ll continue it after I’ve run OSAF’s cvs repository thru one bonsai and the svn repository thru another to make sure I’m getting the same insertions. woo fun stuff!

SVN on Tinderbox

Finally got a chance to really do some heads-down spelunking into the VC_SVN.pm code that I am working on and I fixed the final problem that was blocking me!

The short answer is that I was processing the datetime info being returned from the svn query as GMT instead of local time – boy does that make it fun to debug, especially when your test SVN server is in the UK and your test tinderbox setup is on the east coast. What I thought was a problem with data not being inserted correctly just turned out to be timezone related — the test data was always 5 hours out of sync and I ended up getting nothing being generated. That’s what I get for having a large gap between the initial coding and the debugging. I probably had it in my head about the datetime for the CVS code (which I used as a template) being GMT based but then promptly forgot about it when I started doing the real grunt work of getting the svn response parsed.

The upside to this was I did spend some “quality time” with the innards of the TinderDB module so I know even more about it than before :)

After running it for about an hour on my local setup I then transferred it to OSAF’s live Tinderbox where you can see the SVN column with live data.

Next comes sending this to the Mozilla folks to see if I can get it included in the Tinderbox2 source repository.

entry cleanup

I ran thru and cleaned up some of my more recent postings to take advantage of the new pyblosxom capabilities. Hopefully it didn’t trigger your aggregators to mark them as updated.


Creative Commons Attribution-ShareAlike 3.0 United States
This work by Mike Taylor is licensed under a Creative Commons Attribution-ShareAlike 3.0 United States.