I use Mercurial on desktops, and then push local repositories to a centralized server. I noticed that this remote server does not hold local copies of files in its repositories (the directory is empty, except obviously for the .hg
one).
What is the preferred way to populate these directories with local copies? (which in turn are used by various unrelated services on that server).
What I came up so far is to use a hook and hg archive
to create a local copy. This would be a satisfactory solution but I need to configure a per-repository hgrc
file (which is tedious but I did not find a way to centralize this in /etc/mercurial/hgrc
). Maybe a global script (in /etc/mercurial/hgrc
, run for each changegroup event)? (in that case how can I get the repository name to use in a if...then
scenario?)