On Aug 5, 2015, at 9:35 AM, Andy Goth <[email protected]> wrote: > > It creates an empty file called dir2 and leaves dir/file alone.
Okay, this isn’t an argument about proper semantics after all, it’s a bug report. The behavior you’re seeing is simply wrong. I suspect the core problem is that Fossil doesn’t version directories, only files. That is, there is no “fossil mkdir” command, and “mkdir foo ; fossil add foo” is a no-op. I’ve run up against this several times since switching from Subversion. > Unix mv would have renamed the directory from dir to dir2 Yes. “fossil mv --hard” should do that, too. > i.e. made the > new directory, moved all files and subdirectories into it, then removed > the old directory. If Fossil has to implement “mv” that way, it’s doing too much work, and is probably setting itself up for another semantic mismatch w.r.t. POSIX mv semantics, since that is not how POSIX mv is implemented, not even down at the filesystem layer. Instead, it should realize that the mv destination doesn’t exist, so it’s clearly a “rename" type mv, not a “move” mv. So, it should call rename(2) on the directory entry, then record whatever it needs to in its DB to remember that foo2 was once called foo, and all of foo’s current contents are now under foo2. The contents of foo should not be touched at all. _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

