Crazyjavahacking
Crazyjavahacking

Reputation: 9697

Get file hash in specific changeset in Mercurial

Is there a way to get file hash in a specific changeset/revision in Mercurial?

Similar to svn proplist command in Subversion.

Thanks

Upvotes: 1

Views: 334

Answers (1)

marco.m
marco.m

Reputation: 4849

I don't think so, since for mercurial the atomic unit is the changeset, not a single file (and rightly so!).

On the other hand, you can use hg cat and pipe to any hash utility as follows

$ hg cat -r REV FILE | md5
$ hg cat -r REV FILE | shasum
...

But again, are you sure focusing on one file (as opposed to the changeset) is the right approach?

Upvotes: 3

Related Questions