Bug 995 - hg copy -A incorrectly handles symbolic links (edit)
:
:
Status: RESOLVED FIXED
:
:
:
Assigned To:
Alexis S. L. Carvalho (edit) (take)

(edit)
:
Depends on: (edit)
Blocks: (edit)
  Show dependency treegraph
 
Reported: 2008-02-17 03:32 EST by Jason DiCioccio
Modified: 2008-03-18 16:14 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 Jason DiCioccio 2008-02-17 03:32:46 EST
Given the following directory structure in the repository:

dir1/test/
dir1/test/main.c
dir1/testlink -> test
dir2

If you wanted to move test and testlink out of dir1 and into dir2, you might do
something like this:

mv dir1/test dir2
mv dir1/testlink dir2
hg copy -A dir1/test/main.c dir2/test/main.c
hg copy -A dir1/testlink dir2/testlink

What is happening though, is the last command will trigger the following error:

abort: path 'dir2/testlink/testlink' traverses symbolic link 'dir2/testlink'

This is despite you never referencing a 'dir2/testlink/testlink'.  Seems like
this is something that should work.  FYI, I tickled this bug when using
hgimportsvn/hgpullsvn.
Comment 1 mathieu clabaut 2008-03-07 02:18:50 EST
I was bitten too by a similar issue some months ago, didn't take time to make a
testcase at the time, and was unable to reproduce it later... Thank you for
having done it.
I remember it was quite tedious to overcome the problem ...
Comment 2 Alexis S. L. Carvalho 2008-03-14 08:08:45 EDT
Revision c24f4b3f156b in crew should fix this.
Comment 3 Dirkjan Ochtman 2008-03-18 16:14:44 EDT
In main, resolving.
Comment 4 Bugzilla 2012-05-12 08:48:10 EDT

--- Bug imported by bugzilla@serpentine.com 2012-05-12 08:48 EDT  ---

This bug was previously known as _bug_ 995 at http://mercurial.selenic.com/bts/issue995