Fossil User Forum

Deleted files are coming back
Login

Deleted files are coming back

Deleted files are coming back

(1) By Pinchas Neiman (neimanpinchas) on 2025-04-22 20:21:42 [link] [source]

Hi

I am working with fossil in a team, when i want to delete a file from the working tree and commit it, it is always coming back after a few days.

I understand that, when i do add remove, and commit it is being marked as deleted, but when the peer does update it doesn't delete the file, and instead its adding back the file with his next addremove, so when i do filssil update i am getting it back.

How can i remove the file completely?

(2) By Stephan Beal (stephan) on 2025-04-22 20:32:03 in reply to 1 [link] [source]

How can i remove the file completely?

You'll need to stop using "addremove" - it's doing exactly what it's told. Use "add" and "rm" individually to manage the list of files. Use of "addremove" is, IMO, an anti-pattern, especially when working with other developers. It possibly fine for single-person repos, but having multiple developers using it is a recipe for grief.

(3) By Pinchas Neiman (neimanpinchas) on 2025-04-22 21:13:47 in reply to 2 [link] [source]

mmm, i usually have many files to add or remove, i will need to develop a tool that makes a text file with all new files, where i could edit the list and execute, something like nnn has for batch rename.

I have a similer script for doing commits on selected files only.

Anyway thank you very much

(4) By Martin Gagnon (mgagnon) on 2025-04-22 22:18:27 in reply to 2 [source]

Something to note here..

If you remove the file (using rm or addremove, doesn't matter), and the other developer didn't modify it, it will be removed during the update.

If some particular files are always automatically generated and you don't want to add them to the repository, may be you want to add those file to the ignore-glob setting, so fossil addremove or fossil add somedir will never add those files.

(for the ignore-glob setting, I always use it as versioned setting by adding .fossil-settings/ignore-glob file into the repository)