symlink tutorial for Mercurial

TK Soh teekaysoh at gmail.com
Wed Jun 27 15:38:27 UTC 2007


On 6/27/07, John Gateley <mercurial at jfoo.net> wrote:
> Would someone be so kind as to give a brief tutorial on using
> symlinks with Mercurial? I'm confused as to how they are supposed
> to behave.

For the user standpoint, a symlink is pretty much like a regular file
to Mercurial, except in this case it's content being the source it's
pointing too. If you later change the symlink to point to a different
file, then it will be mark as modified, and you will need to commit
the change.

IMO, a symlink in your Mercurial repo should normally be pointing to
some file within the repo, or perhaps some file at a 'known-good'
location (like /usr/bin, as a bad example). Checking in a symlink
pointing to a potentially random location might yield some bad result.



More information about the Mercurial mailing list