hg clone fails with abort: could not symlink to

Matt Mackall mpm at selenic.com
Fri Jan 29 19:31:38 CST 2010


On Fri, 2010-01-29 at 17:07 -0800, Kishore Vasudeva wrote:
> 
> > There are no symlinks on Windows, so this failure mode can't exist. But
> > this gives you an easy means to fix your repo (as outlined in my
> > original mail!).
> >   
> Will do that. 
> > > The only interesting thing I see is the changeset diffs(via hgweb)
> > > show the following for the 3 files:
> > >     
> > 
> > Is that changeset a merge?
> >   
> No

Ok, so that narrows the cause down a bit. It's back to looking like user
error.

There are two ways this could happen. The first is that at some point a
merge is done between a file version that's a symlink and one that's a
normal file and a possible old merge bug was triggered. Looks like
that's not what happened.

It can also happen when mounting a Windows filesystem (or other
filesystem without symlinks) on a Unix system though. For example, when
moving a repo around on typical VFAT-formatted flash drive.

If you check out a symlink on a non-symlink-capable filesystem, you will
get a normal file containing the link as its contents. If you edit that
file and check it back in, it will be stored in Mercurial as a symlink
pointing to the edited file contents. So either someone using a flash
drive noticed that index.html was a nearly empty file and helpfully
"fixed it" (thus making a too-big symlink), or they used some
symlink-unaware tool to move files back and forth between a Unix and
Windows filesystem (eg. while copying a repo onto a flash drive).

-- 
http://selenic.com : development and support for Mercurial and Linux




More information about the Mercurial mailing list