Mercurial: how to include version information in export?

Sometimes I need to provide a version of my code to other employees without giving them access to the history (everything inside the .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 to include some information in this export operation that will later tell me which version I actually passed them? For example, let's say automatically, including a hash in a file or something like that? What is the canonical way to achieve something similar in Mercurial?

+4
source share
1 answer

For the latest versions of hg archive put a .hg_archival.txt in the exported directory containing the dump revision.

 $ hg archive ../output $ cat ../output/.hg_archival.txt repo: ca6f47a3560d95bc168f5d348fd42779537ce007 node: e8da6559282f6d0963ee31870ce1f0dc7e138459 branch: default latesttag: null latesttagdistance: 4 
+8
source

Source: https://habr.com/ru/post/1384635/


All Articles