Mark Stephens I have been working with Java and PDF since 1999 and am a big NetBeans fan. I enjoy speaking at conferences. I have an MA in Medieval History and a passion for reading.

Version control files in Mercurial

1 min read

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?

IDRsolutions develop a Java PDF Viewer and SDK, an Adobe forms to HTML5 forms converter, a PDF to HTML5 converter and a Java ImageIO replacement. On the blog our team post anything interesting they learn about.

Mark Stephens I have been working with Java and PDF since 1999 and am a big NetBeans fan. I enjoy speaking at conferences. I have an MA in Medieval History and a passion for reading.

6 ways to improve your code quality

During JavaOne I attended a variety of sessions covering topics from how to use Docker containers to potential issues you may face when migrating...
Georgia Ingham
3 min read

NetBeans Version Control Feature With Mercurial Support.

In this article I will be talking about NetBeans Version Control Feature with Mercurial Support. Version control is one/if not my favourite feature in NetBeans,...
Sophia Matarazzo
3 min read

Leave a Reply

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

IDRsolutions Ltd 2019. All rights reserved.