# Warming up to Mercurial

DevFeed: [Warming up to Mercurial](<https://devfeed.tech/articles/warming-up-to-mercurial-20251.md>)

Original publisher: [Read original article](<http://anjana.dev/blog/warming-up-to-mercurial/>)

Author: Anjana Sofia Vakil (contact@anjana.dev)

Published: 2016-06-03T00:00:00Z

Content type: tutorial

Language: en

Sources: [Mozilla Automation](<https://devfeed.tech/sources/mozilla-automation.md>)

Topics: [Mercury](<https://devfeed.tech/topics/mercury-lang.md>), [Git](<https://devfeed.tech/topics/git.md>), [Firefox](<https://devfeed.tech/topics/firefox.md>), [Mozilla](<https://devfeed.tech/topics/mozilla.md>), [Testing](<https://devfeed.tech/topics/testing.md>)

Tags: [firefox](<https://devfeed.tech/tags/firefox.md>), [git](<https://devfeed.tech/tags/git.md>), [graph](<https://devfeed.tech/tags/graph.md>), [install](<https://devfeed.tech/tags/install.md>), [marionette](<https://devfeed.tech/tags/marionette.md>), [mozilla](<https://devfeed.tech/tags/mozilla.md>), [repo](<https://devfeed.tech/tags/repo.md>), [testing](<https://devfeed.tech/tags/testing.md>), [version-control](<https://devfeed.tech/tags/version-control.md>)

## AI overview

A developer documents learning Mercurial after working primarily with Git, explaining basic repository operations and terminology while contributing to Mozilla's Marionette project for Firefox. The article highlights similarities between Mercurial and Git and describes differences involving logs, graphs, changesets, revisions, and identifiers.

## Source excerpt

When it comes to version control, I'm a Git girl. I had to use Subversion a little bit for a project in grad school (not distributed == not so fun). But I had never touched Mercurial until I decided to contribute to Mozilla's Marionette, a testing tool for Firefox, for my Outreachy application. Mercurial is the main version control system for Firefox and Marionette development,1 so this gave me a great opportunity to start learning my way around the hg. Turns out it's really close to Git, though there are some subtle differences that can be a little tricky. This post documents the basics and the trip-ups I discovered. Although there's plenty of other info out there, I hope some of this might be helpful for others (especially other Gitters) using Mercurial or contributing to Mozilla code for the first time. Ready to heat things up? Let's do this! Getting my bearings on Planet Mercury OK, so I've been working through the Firefox Onramp to install Mercurial (via the bootstrap script) and clone the mozilla-central repository, i.e. the source code for Firefox. This is just like Git; all I have to do is: $ hg clone <repo> (Incidentally, I like to pronounce the hg command "hug", e.g. "hug clone". Warm fuzzies!) Cool, I've set foot on a new planet! ...But where am I? What's going on? Just like in Git, I can find out about the repo's history with hg log. Adding some flags make this even more readable: I like to --limit the number of changesets (change-whats? more on that later) displayed to a small number, and show the --graph to see how changes are related. For example: $ hg log --graph --limit 5 or, for short: $ hg log -Gl5 This outputs something like: @ changeset: 300339:e27fe24a746f |\ tag: tip | ~ fxtree: central | parent: 300125:718e392bad42 | parent: 300338:8b89d98ce322 | user: Carsten "Tomcat" Book <cbook@mozilla.com> | date: Fri Jun 03 12:00:06 2016 +0200 | summary: merge mozilla-inbound to mozilla-central a=merge | o changeset: 300338:8b89d98ce322 | user: Jean-Yves A