.hgcheck symlinks & dropbox

Mads Kiilerich mads at kiilerich.com
Thu Jan 3 01:25:30 UTC 2013


Dr. Hegewald wrote, On 01/02/2013 05:44 PM:
> Hi all,
> I share several development directories via dropbox. Most of them contain mercurial repositories. Everything went good so far.

What platform and what Mercurial version are you using?

And you are using some kind of mounted virtual dropbox filesystem? Not 
just a local filesystem where dropbox is reading and writing?

> Now I got an error when doing hg up:
> 	abort: could not symlink to '.': File exists: foobar/.hgcheck/hg-checklink-hk9Io6

Is that the exact error message?

> Mercurial seems to expext the file to be a symlink. It is a symlink on another machine, from which Dropbox "synced" it and copied the target instead of the symlink. Now it is a directory and hg fails with the above error.

What do 'it' refer to? Do you have a file called 
'foobar/.hgcheck/hg-checklink-hk9Io6' in your dropbox and in the 
Mercurial repository?

> So now I have these questions:
> - can I namually remove the contents of .hgcheck ?

Mercurial do not use '.hgcheck'.

Mercurial will try to create a 'hg-checklink-??????' symlink in the 
working directory to find out whether the filesystem support symlinks or 
not.

> - is it a bad idea to sync mercurial repos via dropbox?

Yes. Apparently.

Mercurial is a version control system and expects fully reliable posix 
semantics from the file system. There shouldn't be any need for anything 
clever below it ... and it will probably cause trouble. But someone will 
probably report that it works just fine for him.

> - what other symlinks are created by mercurial?

Locks and whatever symlinks has been committed in the repo.

/Mads



More information about the Mercurial mailing list