hg convert changes a revision's node ID for an unknown reason

Augie Fackler durin42 at gmail.com
Sat Jun 25 22:22:34 CDT 2011


On Jun 25, 2011, at 6:32 PM, Mads Kiilerich wrote:
> 
>> I checked the SHA-1 of images/icons/whistle.psd in each repo. It's 52d8343c6b4cebe55e3b9f9b5eae2bd15344b326 in both. diff -s confirms that both files have identical contents.
>> 
>> So, why is the node ID different in the converted repo, and what can I do about this (or is it a bug)?
> 
> The changeset id is a hash derived from the file content and all meta data of the changeset and all its ancestors. You are right that it should be stable over conversion, and usually it is.

There's also another potential wrinkle: convert stores source information in extra, which will necessarily change all the hashes. Maybe we should add a flag to allow disabling that for hg->hg conversions when doing some kind of filter operation?


More information about the Mercurial mailing list