13

I've done some research, but honestly can't seem to figure this out.

You can set some set some options to have fossil extras ignore files, but not fossil add? The configuration options through the web interface is great, and I'm pleased that it does work for the extras command, but it doesn't apply to the add command?

How does one configure fossil to ignore files on fossil add .?

bbrietzke
  • 131
  • 1
  • 3

6 Answers6

17

You can use the settings ignore-glob command to list the directories/files to ignore as a comma-separated list.

  1. On your repository's web interface, go to the Admin menu, select Settings and type the comma-separated list of directories to ignore; for example: */*.suo,*/*/bin/*,*/*/obj/*.
  2. Alternatively, on the command line you can type fossil settings ignore-glob to list the applied ignore list, or fossil settings ignore-glob list-of-files.
  3. You can also create/edit the .fossil-settings/ignore-glob at the root of the project and insert the comma-separated list of files/directories to ignore; I have not personally tested this, but I remember reading this online.

For example, on the command line you can do:

fossil settings ignore-glob "*/*.suo,*/*/bin/*,*/*/obj/*"

This would ignore all .suo files in every subdirectory at the Fossil repository root tree, and all the files in the bin and dir subdirectories at the each of the directory in the root directory.

jbatista
  • 2,747
  • 8
  • 30
  • 48
7

If you want something like .gitignore or .hgignore, you can read https://www.fossil-scm.org/index.html/doc/tip/www/settings.wiki

mkdir .fossil-settings
echo '*/*.suo' >> .fossil-settings/ignore-glob
echo '*/*/bin/*' >> .fossil-settings/ignore-glob
fossil add .fossil-settings
Daniel YC Lin
  • 15,050
  • 18
  • 63
  • 96
5

See this check-in in fossil development repository. What you asked for has been implemented.

Benoit
  • 76,634
  • 23
  • 210
  • 236
2

On Windows 7 (not tested on other platforms)

If you do

fossil add *.*

All ignore-glob settings are ignored (all files are added).

If you do

fossil add .

then ignore-glob settings are used.

stevenally
  • 89
  • 1
  • 4
2

very recent versions of Fossil have an addremove command that will add all extras and remove all missing files in your working tree. The --ignore-glob switch is available.

Perhaps this is what you are looking for?

Otherwise you could probably just do :

fossil extras | xargs fossil add
Benoit
  • 76,634
  • 23
  • 210
  • 236
  • 1
    I think the OP was actually trying to get the effect of your other answer. Its a feature I've wished for myself as well. – RBerteig Jan 10 '11 at 10:39
  • 1
    Of course, but at that time it was not implemented. Now it is. I have sometimes the feeling that drh reads posts about fossil or sqlite on stackoverflow as well as tickets on his repository. – Benoit Jan 10 '11 at 10:59
  • He has commented on stackoverflow before, so I wouldn't be surprised if he's still following it. Considering how principled he is about SQLite (http://www.sqlite.org/testing.html), it seems likely he's interested in continuously improving fossil as long as it fits his vision (he refused a pull request for hooks because the solution wasn't 100% cross-platform, for example). – Alan Plum Jan 11 '11 at 22:02
0

It is because I have already added the file, and fossil skipped the duplicated "add" operation, OMG.

Chandler
  • 97
  • 4