On 2017-04-11 23:09, Ross Berteig wrote:
On 4/10/2017 11:48 AM, Thomas wrote:

Actually, I got a batch file that reads the file filter settings from
another file and creates the binary-glob and the ignore-glob files on
the fly before an addremove and a commit (crlf-glob is not created and
only contains an asterisk now).

Why do this on every commit?

That's a legit question. The reason is that at first I only learned about the command line swiches, that take the list comma separated. My files however contained a mask on each line, basically the same way the .fossil-settings files are outlined. I only learned about the .fossil-settings folder later here in the mailing list, hence I just quickly changed the batch file to create the required files.

The reason why I had my files in this format is because I assembled my lists from sources on the web with common file name extensions, file and folder names.


The whole point of the versioned settings is that they can be set once
and stored, and are carried with the repository into every working
folder on fossil open.

The only differences to my file is that it's got a different filename extension for which Notepad++ allows me to insert syntax-highlighted coments, and that it sorts the list. That's all.


You figure out what files never need saving, and put globs in
ignore-glob that match them. Note that the globs are matched on the
whole pathname in the working folder, so you can exclude entire folders
too if that is handy. Which is nice for things like the Release and
Debug folders that VS tends to create in its projects. You will want to
work out carefully what files your IDE needs to be treated like source
code, which of those are binary (a stupid mistake made by too many IDEs
is to use binary files for project configuration which makes using
version control harder than necessary), and which files are build products.

Something like this is my usual starting point for ignore-glob for a lot
of projects. I usually create ignore-glob right after creating the
repository and before checking things in. I always include globs for
whatever backup files get created by my text editors, all the build
products I can identify, and if practical, any folders created by building.

~*,*.bak
*.o,*.d
*.obj,*.exe,*.dll
*.bin,*.hex
*Build*/*
*build*/*
ship/*
*.zip,*.tar*

The fossil extras command is useful for finding things that belong in
ignore-glob. It lists the files that fossil addremove would add or
fossil clean would delete.

IDEs come with an extra burden. They always seem to be written by people
that believe there is no world outside of the IDE, and especially no
version control. Worse, they also seem to be hostile to all the other
IDE developers, and highly resistant to any sort of standardized naming
of things. On the positive side, there is this project at Github where
people are tracking what to tell Git to ignore. The syntax isn't
identical for fossil, but the data is still valuable.

  https://github.com/github/gitignore

This is actually one of the sources I based my exclusion list on.
I added other files too. I replaced all # characters at the beginning of each line with semicolons, extracted the files like [Tt]umbs.db to Thumbs.db and thumbs.db, saved it, and let my batch file create a comma-separated list for the --ignore command line switch.


_______________________________________________
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