Update: JPDF2HTM5 has been rebranded as BuildVu and JPDFForms has been rebranded as FormVu

Version control files in Mercurial

If you read my previous article on First impressions of Kiln and Mercurial, you will know that we have moved over from Subversion and are tentatively learning how to use it. When you use a Version control system, you will find some hidden files appearing on your system and this article aims to tell you about them (DO NOT DELETE THEM!).

When we used Subversion, every directory would contain a .svn directory storing the Version control data. So if you zipped up your source code directory you could actually revert the update by unzipping a previous copy. This would over-write the  files and the version control details, turning the clock back and backing out any updates you had done.

Subversion also had a useful file called .svnignore which allowed you to tell Subversion to ignore files and directories. This is very handy if you have lots of transient data or specific project or setup files on different machines (so we do not keep over-riding each others settings).

Mercurial is very similar but you now have an additional local repository. This is stored in a directory called .hg in the root of your source where the local repository and not in the source code folders.

If you want to back out Mercurial changes manually (as we described with Subversion above), you will need a zipped copy of your source code and the .hg directory. It is less useful in Mercurial because Mercurial is much more flexible with reverting changes.

Mercurial also has a .hgignore file which allows you to avoid committing local or transient files.

So (as I seem to say a lot) Mercurial is very similar to Subversion in many respects. Have you been encoruaged to look at Mercurial as a result of these articles? What did you think of it?

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX.

He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>