Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6571431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T14:52:54+00:00 2026-05-25T14:52:54+00:00

I’ve been using git for a while now, and since it is the only

  • 0

I’ve been using git for a while now, and since it is the only DVCS I have ever used, I’ve learned to rely a lot on the way it works for my workflow.

I’m in a new company now, and they use Mercurial, so I need to understand Mercurial’s model and how it differs from git, to adapt my workflow and avoid making costly mistakes.

So what resources can I use for this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T14:52:54+00:00Added an answer on May 25, 2026 at 2:52 pm

    Quite extended concept differences from Mercurial’s official wiki.

    Another question from stackoverflow: Git equivalents of most common Mercurial commands?

    Comment follow up:

    If I resume: “model“, “differences“, “philosophy behind the differences” and influences on the “workflow“. In the differences I can think of, there is:

    • For the workflow, except the lack of staging area, you should be able to stick on your old practices (when to commit, when to branch, when to merge,…).
    • The main difference of philosophy about branches is that Git clones only the specified branch when Mercurial clones all branches (if you want only one branch, it is possible, but it needs configuration).
    • The merge philosophy is not really different. Git can merge two or more heads, but Mercurial can only merge two heads (did you ever merge more?).
    • The philosophy about renames differs greatly and each designer did defend his point of view. As Mercurial tracks renames, merge can be easier. Git tries to guess renames at merge time if you use the strategy “recursive”.
    • Storage differs greatly in implementation, but not in concepts (as you asked for “model”, I will put more details):

      • Git stores data as “objects” (“commit object”, “tree object”, “blob object” or “tag object”, stored as file uniquely identified by there name which is a SHA1 hash). This is some kind of “filesystem hash table”. With recent versions, those objects can be packed to have less small files under the .git/objects directory. I will not go further, my understanding stop here as I never found use to know how bits are laid. You can have a pretty printing in the object’s content with:

        git show -s --format=raw <commitid> # changeset content
        git ls-tree <treeid> # list tree content
        git show <fileid> # blob content
        
      • Mercurial stores history of each files individually as “filelog” in the “revlog(NG)” format. You can manually inspect file names under .hg/store/data (revlogNG). Note that special and uppercase characters are “tilda-underscore encoded”.

        You can list revisions of a file with:

        hg debugindex .hg/store/data/<file>.i # hg debugindex <file> also works but you see less of internals
        

        You have already noted that the nodeids are not the one in hg log.

        And now, inspect the contents with:

        hg debugdata .hg/store/data/<file>.i <nodeid>
        

        The revision history (more or less what you see with hg log) is stored in .hg/store/00changelog.i (inspect it with hg debugindex .hg/store/00changelog.i, you will see the same IDs as the one in hg log in the nodeid column). To show one raw history entry with id XXXX, type hg debugdata .hg/store/00changelog.i XXXX in a terminal. (look at first line, it will be used later as YYYY)

        The state of the tree is stored in .hg/store/00manifest.i. The corresponding nodeid in the manifest is YYYY.

        hg debugdata .hg/store/00manifest.i YYYY
        

        This will show a list of “filename+nodeid” appended. Let’s choose file foo/bar and note the nodeid appended to it and consider it is ZZZZ (line foo/barZZZZ).

        Last step, access to the content of the foo/bar file:

        hg debugdata .hg/store/data/foo/bar.i ZZZZ
        
      • For the differences in philosophy clearly visible from this basic data storage analysis:

        • When Git commits, it make (potentially a lot of) new files (which can be packed later). When Mercurial commits, it appends to existing files.

        • In Git a blobid can collide with a treeid (or commitid or tagid) but that is highly improbable. In Mercurial, a changesetid can collide only with another changesetid (ditto for manifests (tree) and files (blob)) which is even more improbable.

    • In Git, tags are special objects, in Mercurial, it’s just a list in a file in the repository (with some rules to know which modified copy of the same tag wins).
    • In Mercurial, there is no “amend” or “rebase” by default and it is a design choice (philosophy?), always append, never remove content, as it can cause concurrency problem. But it is possible with extensions.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I used javascript for loading a picture on my website depending on which small
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm using v2.0 of ClassTextile.php, with the following call: $testimonial_text = $textile->TextileRestricted($_POST['testimonial']); ... and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.