Fossil Forum

mv-rm-files settings
Login

mv-rm-files settings

mv-rm-files settings

(1) By decuser on 2023-11-05 15:02:54 [link] [source]

In one of my repos, I checked Admin->Settings->mv-rm-files, but when I fossil mv or rm, it doesn't do the rm on the filesystem. I'm sure it's my misunderstanding, but why not?

Is the mv-rm-files setting supposed to cause fossil to both mv/rm the file in the repo and file system, or is it something else?

Is there a way to get this to happen with a single fossil command? I keep running into the issue that I fossil mv or fossil rm something and forget to mv or rm it in linux and then later I get multiple copies of the target, and in multiple parts of the repo.

Thanks,

Will

(2) By Stephan Beal (stephan) on 2023-11-05 15:26:52 in reply to 1 [source]

but when I fossil mv or rm, it doesn't do the rm on the filesystem. I'm sure it's my misunderstanding, but why not?

Be sure that you've set that on your local clone, not a remote copy. To the best of my (fallible) recollection, that setting is local to a specific clone.

Is the mv-rm-files setting supposed to cause fossil to both mv/rm the file in the repo and file system, or is it something else?

$ fossil help mv-rm-files
Setting: "mv-rm-files" (default: off)

If enabled, the "mv" and "rename" commands will also move
the associated files within the check-out -AND- the "rm"
and "delete" commands will also remove the associated
files from within the check-out.

I keep running into the issue that I fossil mv or fossil rm something and forget to mv or rm it in linux and then later I get multiple copies of the target, and in multiple parts of the repo.

If that setting is enabled, mv/rm should behave as you seem to expect them to. If it's not then you can end up with stray files in your repo, especially if you use the "addremove" or "add ." commands. My recommendation is to never use "nuclear options" like those: always tell fossil precisely what you want added to the repository. Also, always be sure to use "fossil status" before committing to ensure that you are not (re)introducing any files you don't really want to.

(3) By decuser on 2023-11-05 15:55:32 in reply to 2 [link] [source]

Great answer, also:

https://fossil-scm.org/home/doc/trunk/www/settings.wiki

If you make a change to a setting on your local repository, it is not synced back to the server when you push or sync. If you make a change on the server, you need to manually make the change on all repositories which are cloned from this repository.

Duh, read the manual :).