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.
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.
You cannot compare SHA1 hashes between Git and Mercurial (they would be different anyway)
But you can at least script and compare:
git log
(which includes comment) And see if the list has the same number of elements and if the comments matches
For each commit, you can:
hg status --change <rev>
)And make sure each one:
Using a diff tool alone is not enough: you need to do it revision by revision.
If you have a copy of the original HG and new Git repos locally, you can use a program like WinMerge to diff both folder trees.
Excluding the "internal" files like .hg
you should find an identical set of files at the heads of both.
Personally I like this approach because it is independent of the source control systems themselves. If you don't fully trust the Git conversion in the first place, I think its sensible to check the "facts on the ground" directly without going through any extra intermediate steps.