Search code examples
gitgitlabmercurialrepositorybitbucket

How do I know my git repository is same as my Mercurial repository?


I converted my Mercurial repository(in Bitbucket) to git (gitLab), I am wondering that how can I know that no files/comments were missing? How to check if two repositories are the same?

Thanks, Jennifer.


Solution

  • You cannot compare SHA1 hashes between Git and Mercurial (they would be different anyway)

    But you can at least script and compare:

    And see if the list has the same number of elements and if the comments matches

    For each commit, you can:

    And make sure each one:

    • has the same number of files.
    • has the same content, by comparing them with a diff tool (kdiff3 or, as suggested below, WinMerge if you are on Windows)

    Using a diff tool alone is not enough: you need to do it revision by revision.