fossil

Move large number of files in Fossil repo


Is there a way to move a large number of files in a Fossil repo?

Ideally, I'd be able to move them to a new directory, and Fossil would detect that and keep tracking them. fossil mv requires specifying the filenames individually. fossil add can be used to start tracking the files once they've been moved, but then I have to use fossil rm to delete the existing files one at a time. Neither of these is practical for more than a handful of files.


Solution

  • fossil addremove does this. It's the equivalent of fossil add . to add all new files, followed by fossil rm for each missing file.

    Moving files is only one use for this command. You can also use it if you've deleted multiple files.

    The downside is that moved files will be treated as new files, so you will have to keep that in mind when viewing the repo history.