Bugzilla – Bug 653
Win32 Mercurial refuses to update a repo with symlinks
Last modified: 2007-08-09 05:22:22 EDT
The win32 mercurial will try to clone a repository, but when it creates the files on disk, the implementation for symlink/win32 is missing and it aborts with the error below. As Win32 doesn't support symlinks for files (except in Vista), and even then, it's not in any very usable form. Another DRCS (I can't remember which) is having this exact same discussion right now, but I don't know the results. --- requesting all changes adding changesets adding manifests adding file changes added 895 changesets with 3095 changes to 885 files ** unknown exception encountered, details follow ** report bug details to http://www.selenic.com/mercurial/bts ** or mercurial@selenic.com ** Mercurial Distributed SCM (version f48290864625+20070705) Traceback (most recent call last): File "hg", line 11, in ? File "mercurial\commands.pyc", line 3127, in run File "mercurial\commands.pyc", line 3124, in dispatch File "mercurial\cmdutil.pyc", line 37, in runcatch File "mercurial\cmdutil.pyc", line 378, in dispatch File "mercurial\cmdutil.pyc", line 431, in runcommand File "mercurial\cmdutil.pyc", line 387, in checkargs File "mercurial\cmdutil.pyc", line 372, in <lambda> File "mercurial\commands.pyc", line 400, in clone File "mercurial\hg.pyc", line 227, in clone File "mercurial\hg.pyc", line 241, in _update File "mercurial\hg.pyc", line 246, in update File "mercurial\merge.pyc", line 557, in update File "mercurial\merge.pyc", line 415, in applyupdates File "mercurial\localrepo.pyc", line 466, in wwrite AttributeError: 'module' object has no attribute 'symlink'
clone isn't the problem (you can use the -U switch to disable creating the files), but hg update is (which is called by clone without -U). Adjusting title.
Since version 0403b80352c9 (about a week younger that the version you were using), we fall back to creating a regular file when the (file)system doesn't support symlinks (commit will still consider it a symlink). This is similar to the way we handle (file)systems that don't support an execute bit.
Fixed in crew and crew-stable (84b10dc3dccc). I will add a test ASAP (plus probably a complete symlink roundtrip). Do you think it is OK to add specially crafted bundles in tests/ ? I cannot create repo with symlinks otherwise on platform not supporting them.
There already is tests/legacy-encoding.hg, so adding a bundle with symlinks with a similar name would be ok.
Test pushed as dcfd75502b82 I read the message too late. Do you want me to suffix with .hg instead of .bundle ?
yes, .hg is more consistent
--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:42 EDT --- This bug was previously known as _bug_ 653 at http://mercurial.selenic.com/bts/issue653