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.

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?

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.

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
4 min read

Top 5 Free Hosted Version Control Sites Compared

Recently, some friends and I decided to get together and make a good old-fashioned text adventure game. We could have used an existing engine,...
Sam Howard
2 min read

Leave a Reply

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