If you move a directory, fossil moves the files to the wrong directory when you the .. directory. Observe:

<verbatim>9:02 % cd
9:02 % mkdir fst
9:02 % cd fst/
9:02 % fs open
test.sh
project-name: <unnamed>
repository:
local-root:
project-code:
server-code:
checkout:     2011-02-08 22:17:00 UTC
parent:       2011-02-08 16:31:20 UTC
tags:         trunk
comment:      Updating test (user: sean)
9:02 % ll
total 24
-rw-r--r--  1 sean  wheel  7168 Mar 12 09:02 _FOSSIL_
-rwxr-xr-x  1 sean  wheel    29 Mar 12 09:02 test.sh
9:02 % mkdir -p
9:02 % cd
9:02 % echo test1 > file1.txt
9:02 % echo test2 > file2.txt
9:03 % fs addrem
ADDED
ADDED
added 2 files, deleted 0 files
9:03 % fs ci -m "Fossil dir move bug"
New_Version:
9:03 % fs stat
repository:
local-root:
server-code:
checkout:     2011-03-12 17:03:15 UTC
parent:       2011-02-08 22:17:00 UTC
tags:         trunk
comment:      Fossil dir move bug (user: sean)
9:03 % cd ..
9:03 % mkdir ../bur
9:03 % pwd

9:03 % fs mv baz
RENAME
RENAME
9:03 % mv baz
9:04 % fs stat
repository:
local-root:
server-code:
checkout:     2011-03-12 17:03:15 UTC
parent:       2011-02-08 22:17:00 UTC
tags:         trunk
comment:      Fossil dir move bug (user: sean)
MISSING
MISSING
9:04 % cd
9:04 % ll
total 0
drwxr-xr-x  4 sean  wheel  136 Mar 12 09:03 baz
9:04 % ll baz/
total 16
-rw-r--r--  1 sean  wheel  6 Mar 12 09:02 file1.txt
-rw-r--r--  1 sean  wheel  6 Mar 12 09:03 file2.txt
9:04 % fs addremove
ADDED
ADDED
DELETED
DELETED
added 2 files, deleted 2 files
9:04 % fs ci -m "files ended up in the wrong dir"
New_Version:
9:04 % fs stat
repository:
local-root:
server-code:
checkout:     2011-03-12 17:04:53 UTC
parent:       2011-03-12 17:03:15 UTC
tags:         trunk
comment:      files ended up in the wrong dir (user: sean)
9:04 % fs extra
9:04 % fs ls


test.sh</verbatim>

Pretty minor, but unexpected with large numbers of files. I'd expect `fs mv baz` to move the directory object itself under bur. Seems like an off-by-one error in terms of path resolution but I haven't looked at the code yet. I remember seeing this in practice with as my path and I think the files ended up and not (don't quote me on that, it was kinda late last night when I saw this and noted the behavior). I think if you resolved the source and destination directories to absolute paths (or absolute relative to the fossil checkout) that this bug would be fixed.