Posts Tagged ‘SVN’

Atomic commits

Thursday, August 9th, 2012 | Limited, Programming

If you’re using version control (you are using version control, right?), the question sometimes comes up as to how often you should commit.

I’m a commit fanatic, I like to commit as soon as soon as I can, no matter how small the change. Other people prefer to wait a little and make large commits all at once. However often you choose to commit, you should make sure it falls within the constraint of being atomic.

This means that each commit is one single, complete change. That is to say that you shouldn’t commit multiple changes at once, nor should you commit a change that is only half done. This is scope in this for different approaches of course “one single, complete change” could be part of a several step refactor as long as the changes stand on their own, so could committing the refactor at once if it is all part of the same unit of work. But the important thing either way is to try and stick to atomic commits.

Think of it like an ACID transaction. Presumably you’re system works before you make the commit and it should work after too. It should contain just one feature so that if you want to roll that specific feature back, you can roll back that one commit without rolling anything else back.

With Git, where people may want to take out of sequence commits, this becomes especially important. People may want to take one of your changes, but not the other, so making sure two changes are in two separate commits is very important. Generally, if your descriptive commit comment (you are writing descriptive comments, right?) contains the word and, you probably need to re-think your commit.

Short tags

Wednesday, August 13th, 2008 | Life

Short tags. My one victory of the night.

It’s been one of those days.

I got my new equipment delivered today in preparation for the podcast. The mic stands are, well, awful. They are way too big. Still I’m sure I can look beyond that if only Behringer had got back to me in terms of configuring my mixing deck so sound comes out. I haven’t got that far yet so I’m now sitting on lots and lots of very expensive equipment that I can’t get to work and we start recording the show in just over a week.

A-Soc. I had to redo the artwork for the membership cards because everyone prints different “standard size” business cards apparently. I don’t know if my artwork has sent because all my SMTP servers sent my email then told me it had rejected it. And I can’t order the hoodies because people aren’t answering their phones after they haven’t responded to my emails. I can’t test the A-Soc website locally because the MySQL server keeps rejecting my connections.

Finance. I’ve had £170 go missing out of my account which means I have had to cancel my card so now at some point I need to go home and get my new card and no doubt spend time on the phone activating it too as well as going through the fraud procedures.

Web. My web host isn’t returning my emails with regards to the fact they have lost my database. I still can’t commit all of my files to the SVN for House Metrics but the one victory I have had tonight is short tags. Having finally got everything running, anything without a full

Integrating SVN with Apache

Sunday, July 6th, 2008 | Life, Tech

If you want to allow access to SVN via Apache, it’s actually nice and easy to install and configure it on a blank system. First, install Apache.

yum install httpd httpd-devel httpd-manual

Next, install Subversion.

yum install subversion

Now we need to bridge he two.

yum install mod_dav_svn

Once you have done this, we have everything we need. So we can go ahead and edit the Subversion configuration to add the Subversion directory to Apache.

vim subversion.conf

Finally, start and reload Apache, then go about creating your SVN repository.