.hgcheck symlinks & dropbox
Dr. Hegewald
hegewald at irmb.tu-bs.de
Thu Jan 3 14:39:16 UTC 2013
On 03.01.2013, at 11:48, Mads Kiilerich <mads at kiilerich.com> wrote:
> On 01/03/2013 09:48 AM, Dr. Hegewald wrote:
>>> Mercurial will try to create a 'hg-checklink-??????' symlink in the working directory to find out whether the filesystem support symlinks or not.
>> OK, so the file *is* created by mercurial`.
>
> No. Mercurial will create the check file in the root of the working directory, not in .hgcheck. And Mercurial will use a random non-existing filename when it is checking for symlink capabilities.
OK.
>
> But yes, it seems like such a symlink somehow got committed to your repo, and Mercurial will then try to create it when updating - just like any other file. But Mercurial can do its job because the symlink collides with an existing directory.
No, there is no such symlink in my repo nor is any committed. The .hgckeck dir is not from me, but seems to be created by SourceTree.
>
>> It is working fine for me for more than a year now. But because Dropbox interferes with the mercurial repo structure, it does not seem to be the best idea (-:
>
> I see no indication that it interferes with the internal repo structure.
Yes, as .hgcheck does not belong to the repo, the problem is not with mercurial but probably with SourceTree. I thought .hgcheck belongs to mercurial, thus my confusion here.
>
> The problem seems to be that it mangles the symlinks that Mercurial carefully manage in your working directory.
>
> Put slightly different: You have two systems that both try to manage the content of your working directory. That might lead to confusion.
>
>> If I commit a symlink, it will be stored as a symlink in .hg/ ?
>
> No. It will be stored inside .hg in a ordinary file in the revlog format. The symlink will be created in the working directory when updating ... if the filesystem supports symlinks.
OK, so transferring the repo only (e.g. without any working copy), the repo should sync fine via dropbox.
Many thanks,
-- Jan
More information about the Mercurial
mailing list