symlink tutorial for Mercurial

John Gateley mercurial at jfoo.net
Thu Jun 28 14:10:44 UTC 2007


On Wed, 27 Jun 2007 10:38:27 -0500
"TK Soh" <teekaysoh at gmail.com> wrote:

> 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.

Thanks - this was my confusion, now cleared up. I added a page
in the Wiki under HOWTOs, if anyone would like to double-check
(or move it to a better section, I wasn't sure if that was the
appropriate place).

> 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.

I'm going to have to re-think how I'm currently doing it.

Thanks,

j


-- 
John Gateley <mercurial at jfoo.net>



More information about the Mercurial mailing list