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?
Latest posts by Mark Stephens (see all)
- How we are improving our code quality with IDEA in 2018 - March 7, 2018
- How we are improving our code quality with NetBeans in 2018 - March 1, 2018
- 3 ways that the European Union is changing the way Companies write software in 2018 - January 31, 2018
- IDRsolutions product range update for 2018 - January 22, 2018
- 4 ways Companies can make remote working successful - December 21, 2017