On 4/11/2017 9:36 AM, Thomas wrote:
I would like to emphasise that --ignore (or .fossil-settings\ignore-glob) is an _explicit_ command, clearly stating the user's desire for exlusion of these files, following the documentation.
Silently ignoring this wish can't be the correct process.

But that isn't what the --ignore switch (and globs) means. It means ignore these files in this command's invocation. That generally has nothing to do with what fossil will do with files that are already in the repository.

To stop tracking revisions of a file that is checked in, you must ask fossil to do that explicitly. There are two ways to achieve that:

1. fossil rm somefile
2. rm somefile && fossil addremove

The fossil rm command marks the file as deleted as of a specific checkin, which is also on a specific branch. That is, the removal is itself versioned. This is the proper way to remove a source file that is no longer needed. It disappears from this branch and all descendants, but not from any other branch, or from the past.

(Fossil rm can also be used to reverse an unintended fossil add *before* it is checked in. In this case, it operates on the working checkout only. But the intent is the same.)

Generally fossil rm only acts on the repository, but there has been discussion of whether not also deleting the file from disk is or is not surprising to a user. So there is a setting that changes the default, and a command line option that forces it to also delete from disk. There is also a near-synonym "forget" that will never delete from disk. See fossil help rm for all the gory details.

The fossil addremove command is a convenience command that scans the tree, obeying some of the glob settings, and applies fossil add and fossil forget command as needed to make the list of files now in the repository consistent with the settings and the directory tree in the working checkout.

Knowing a subfolder is currently a mess, you can freely say fossil addremove --ignore mymessypart without meaning anything more or less than do the addremove operation except in that folder right now.


A switch that doesn't work is either a huge design flaw or a bug. A --ignore switch that doesn't ignore is a huge security bug (and a trap) too.

What would I need a --ignore switch for when I got to delete the files first manually anyway? That's completely contrary to its purpose, isn't it? The reason why I'm using --ignore is because I _don't want_ to delete these files.

You should use fossil forget or fossil rm to remove the files from further tracking, and set the ignore-glob (and check it in) to prevent further accidental tracking.

The --ignore switch is documented to "Ignore files matching patterns from the comma separated list of glob patterns." And that is exactly what it does. The fossil addremove command does not touch those files either on disk or in the repository. It ignored them.

--

Ross Berteig                               r...@cheshireeng.com
Cheshire Engineering Corp.           http://www.CheshireEng.com/
+1 626 303 1602

_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to