Fossil

View Ticket
Login

View Ticket

Ticket Hash: aa494b5832ac1a1ee098d96278f08c0cb7e112b9
Title: Fossil changes symlinks into seperate files
Status: Fixed Type: Code_Defect
Severity: Severe Priority:
Subsystem: Resolution: Fixed
Last Modified: 2013-04-13 10:04:41
Version Found In: 37f295c310
Description:
When fossil adds directories that contain symbolic links to other directories in a fossil repository, on future checkouts the symbolic link will become an entirely seperate copy of the entire directory structure that was pointed to on disk. See below explanatory logs for example / steps to reproduce.

Esp. look at the two outputs of "ls -l three/".

$ fossil version
This is fossil version [37f295c310] 2009-09-21 19:19:20 UTC

$ fossil new tmp.fossil-scm
[...]

$ fossil open tmp.fossil-scm

$ mkdir -p one/two three

$ echo testing > one/two/txt.txt

$ (cd three && ln -s ../one/two)

$ ls -l three/
total 0
lrwxrwxrwx 1 djbclark djbclark 10 2009-09-29 15:05 two -> ../one/two

$ fossil add one three
ADDED  one/two/txt.txt
ADDED  three/two/txt.txt

$ fossil commit -m "test of unexpected behavior" --nosign
New_Version: 160e9429f44953ea6f42902f62a706dd3838775c

$ fossil close

$ rm -rf manifest manifest.uuid one three

$ ls
tmp.fossil-scm

$ fossil open tmp.fossil-scm
one/two/txt.txt
three/two/txt.txt
[...]

$ ls -l three/
total 4
drwxr-xr-x 2 djbclark djbclark 4096 2009-09-29 15:07 two
# above - now "magically" an actual seperate copy, not a symlink

$ grep txt.txt manifest
F one/two/txt.txt 9801739daae44ec5293d4e1f53d3f4d2d426d91c
F three/two/txt.txt 9801739daae44ec5293d4e1f53d3f4d2d426d91c
# above - at least I'm guessing this means it doesn't take up extra
# space in the repository, but stat shows they do take up extra
# space on disk (different inodes) , which sucks esp. for this
# project which needs to fit on a certain size of media...

$ stat one/two/txt.txt
  File: `one/two/txt.txt'
  Size: 8         	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 319977      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/djbclark)   Gid: ( 1000/djbclark)
Access: 2009-09-29 15:07:33.000000000 -0400
Modify: 2009-09-29 15:07:33.000000000 -0400
Change: 2009-09-29 15:07:33.000000000 -0400

$ stat three/two/txt.txt
  File: `three/two/txt.txt'
  Size: 8         	Blocks: 8          IO Block: 4096   regular file
Device: 801h/2049d	Inode: 319980      Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/djbclark)   Gid: ( 1000/djbclark)
Access: 2009-09-29 15:07:33.000000000 -0400
Modify: 2009-09-29 15:07:33.000000000 -0400
Change: 2009-09-29 15:07:33.000000000 -0400

(Putting Re: limiting symlinks in ticket form.)


dmitry added on 2011-09-08 18:56:37 UTC:
Fixed by [e4f1c1fe95].

User Comments:
nobody added on 2013-04-13 09:17:42:
Try this first:

$ fossil settings allow-symlinks on

nobody added on 2013-04-13 10:04:41:
I didn't realise this ticket was already fixed and was over a year and a half old! Silly mistake. I found it on Google and it was close to the beginning of the list of results, so I assumed it was rather a recent ticket.

I do apologise for any inconvenience caused by this.