Sometimes, I need to provide a version of my code to other collaborators without giving them access to the history (everything inside .hg directory). I do this by cloning my repository, updating the clone to the required version and deleting the .hg directory.
Is there a way I can include some information in this export operation that can later tell me which version I had actually passed them? For example, say automatically including the hash in a file or something similar? What is the canonical way to achieve something like this in Mercurial?
Recent versions of hg archive
place a .hg_archival.txt
into the exported directory, which contains the revision of the dump.
$ hg archive ../output
$ cat ../output/.hg_archival.txt
repo: ca6f47a3560d95bc168f5d348fd42779537ce007
node: e8da6559282f6d0963ee31870ce1f0dc7e138459
branch: default
latesttag: null
latesttagdistance: 4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With