Bug 653 - Win32 Mercurial refuses to update a repo with symlinks (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Patrick Mézard (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2007-07-25 12:24 EDT by Charles Samuels
Modified: 2007-08-09 05:22 EDT (History)
5 users (show)

(add)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Samuels 2007-07-25 12:24:41 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'
Comment 1 Thomas Arendsen Hein 2007-07-25 14:39:50 EDT
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.
Comment 2 Alexis S. L. Carvalho 2007-07-31 13:17:44 EDT
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.
Comment 3 Patrick Mézard 2007-08-06 03:18:23 EDT
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.
Comment 4 Thomas Arendsen Hein 2007-08-06 03:41:53 EDT
There already is tests/legacy-encoding.hg, so adding a bundle with symlinks with
a similar name would be ok.
Comment 5 Patrick Mézard 2007-08-08 15:15:05 EDT
Test pushed as dcfd75502b82
I read the message too late. Do you want me to suffix with .hg instead of .bundle ?
Comment 6 Thomas Arendsen Hein 2007-08-09 05:22:22 EDT
yes, .hg is more consistent
Comment 7 Bugzilla 2012-05-12 08:42:12 EDT

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