Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming directories with the Fossil DVCS

Tags:

dvcs

fossil

Is it possible to rename directories with Fossil? I've tried the obvious command:

fossil mv oldname newname

Fossil then informs me that it has done something:

RENAME oldname newname

However, calling "fossil changes" results in an empty list. As far as I can tell, renaming directories is either not supported, not yet implemented or just broken. Is there a trick to this?

like image 441
Ant Avatar asked Dec 15 '09 14:12

Ant


1 Answers

After some research I've found that it can be done, but it is counter-intuitive. Fossil doesn't really care what happens to directories; all it cares about is the location of the files within them.

When renaming a directory, Fossil appears to:

  • loop through the repository's list of files for the old directory;
  • locate the file in the new directory on the filesystem;
  • update the files' metadata so that they are listed as being part of the new directory.

If the new directory does not exist, this fails. There are no files in the new location so Fossil cannot match up the old with the new, so no changes are made.

In short: You must rename the folder via the filesystem before you try to make the change to Fossil. If you don't, Fossil ignores you.

Now that I think about it, this makes sense, though I'd prefer it if Fossil would just update the filesystem itself instead of forcing a two-step process on its users.

As an addendum, it appears to be impossible to add an empty directory to Fossil. I assume that internally it stores just files; folders are considered to be metadata. An empty folder is metadata describing nothing, so adding them makes no sense.

like image 153
Ant Avatar answered Oct 20 '22 08:10

Ant