Managing Creative Assets – 3: TortoiseHg Tutorial

2009 December 15

Managing Creative Assets is a multi-part series on how you can manage your creative works such as a novel or even blog post without impairing your creativity. It highlights the importance of using a version control system as an integral part of one’s creative workflow. Part 1 gives a good introduction to the series which is aimed at technology novices

Getting started with Mercurial: A tutorial

The concluding part of this series will be the installation and typical usage of Tortoise Mercurial, a user friendly GUI front-end for Mercurial. It is commonly referred to as TortoiseHg (the chemical symbol for mercury).

This will be a fairly simple tutorial to follow as each description is followed by a screenshot. These screenshots were taken on Windows XP, but they will be pretty similar in other OSes

Download Tortoise mercurial from the Bitbucket site. There are installables for Windows as well as for Linux. Installation on Windows is fairly straightforward as it is wizard-based.

  1. Create a new folder for keeping your art assets. This will be your project folder. In this screenshot (click for a larger image), I have created a project folder for the purpose of composing this series of blog posts. Simply right-click, and select ‘Create Repository here’ under the TortoiseHg sub-menu:

    010 - Create.png

  2. The defaults in the ‘Create Repository’ dialogs are fine. Just click Create.

    020 - Create Dialog.png

  3. The new repository has been created. That was easy, wasn’t it?

    030 - Created.png

  4. Now, enter the project folder and view the changes. On some OSes, you might see nothing here. These files are not intended to be seen or modified, hence they might be hidden. You can safely ignore them.

    040 - Project folder.png

  5. This is a screenshot of a new file that I am editing (using Emacs editor) inside the project folder. I am ready to check-in this file.

    050 - New File on Emacs.png

  6. Now, you will need to add this new file to your repository. Let’s skip that and directly perform a commit. We will be later given a chance to add this file.

    060 - First Commit.png

  7. Here you can see our newly added file as unchecked. This means that this file is not yet under version control

    070 - Commit Dialog.png

  8. Go ahead and mark the check box next to this file

    080 - Commit Dialog File Added.png

  9. In the edit box above, you can add a short comment about this commit. Since this is the initial commit, my comment is simply ‘First Commit’

    090 - Commit Dialog Comment Added.png

  10. Mercurial acknowledges the successful commit with the name(s) of the committed files

    100 - Commited.png

  11. Notice that your file has a green tick icon indicating a successful check-in

    110 - Overlay Icons Added.png

  12. Many hours and many check-ins later, my post is nearly close to completion. I commit this version as well.

    115 - Emacs Final Screen.png

  13. In the commit dialog, notice the Repository Explorer in the menu.

    120 - Going to repo explorer.png

  14. You can view the history of changes in reverse chronological order. You can right click on any of them to compare the changes or revert back to an earlier version.

    130 - Repo explorer.png

  15. Simply clicking on each version will show the diff (in UNIX format) between the consecutive versions in the lower right window.

    140 - Repo explorer shows changes.png

  16. You can perform a revert by selecting the Revert option.

    150 - Reverting.png

  17. As indicated by the warning, your current file will be overwritten to an older version. But subsequently you can revert to the latest version as well, so this is not too much of an issue.

    160 - Revert Confirm.png

That’s pretty much all you need to know to use Tortoise Hg. Hope you found this series informative!

Related posts:

  1. Managing Creative Assets – 2: Distributed Version Control Systems
  2. Managing Creative Assets – 1
  3. Emacs Tip: A Key to open the Current Folder in Windows

1 Tweet

5 Responses leave one →
  1. December 15, 2009

    Hi,

    In step 16, 17, you selected Revert option. However, if you want to change contents in your working directory, you may want to select Update command from the context menu on the revision, instead of Revert. Revert means “Update contents in working directory, but don’t change current parent revision”. On the other hand, Update also changes the current parent revision.

    • Arun Bhai permalink*
      December 15, 2009

      Good point. I chose Revert because I didn’t want a novice user to make permanent changes just to view a previous version. In case, they would like to commit later, they can chose to do so. Update option is great timesaver when they have grown comfortable to version control and wants to avoid a two step process.

      • December 15, 2009

        Hmm… it’s a difficult problem. After reverting, you will see reverted changes in Commit dialog. I suppose it causes more confusing for a novice user. Especially, if the user modify the file in reverted working directory, it has mixed contents; “reverted changes” and “newly introduced changes”. I’m afraid of conducing the novice user to the chaos world…

  2. December 24, 2009

    Very good tutorial. Enjoyed reading it! Keep them coming.

Leave a Reply

Note: You can use basic XHTML in your comments. Your email address will never be published.

Subscribe to this comment feed via RSS

Additional comments powered by BackType