torsdag den 9. september 2010

Commiting only parts of a file in Mercurial

Let say you have a file and by accident changed two unrelated part of the file. Now it would be nice if one could commit each of the changes in their own changeset.

The solution for Mercurial is an extension called record.

You enable the extension in your hgrc file. You would properly want to do it in the ~/.hgrc file to make it system wide.
Just add:

hgext.record =

Then you just write:
hg record

You might also consider these other extensions:

hgext.fetch =
hgext.churn = =
hgext.patchbomb =
hgext.graphlog =
hgext.highlight =
bfiles = ~/path_to_bfiles

onsdag den 8. september 2010

Installing ec2-ami-tools on AWS Ubuntu 10.04 image

I have just spend a disproportionate amount of time solving this simple question.

It is actually pretty easy: Enable the multiverse reposity, update, and install.

The multiverse repository is enable by editing /etc/apt/sources.list

sudo nano /etc/apt/sources.list


deb lucid main universe
deb-src lucid main universe
deb lucid-updates main universe
deb-src lucid-updates main universe
deb lucid-security main universe
deb-src lucid-security main universe


deb lucid main universe multiverse
deb-src lucid main universe multiverse
deb lucid-updates main universe multiverse
deb-src lucid-updates main universe multiverse
deb lucid-security main universe multiverse
deb-src lucid-security main universe multiverse

Now run:
sudo apt-get update

and install:
sudo apt-get install ec2-ami-tools