开发者

FossilSCM, ignoring files on add

I've done some research, but honestly can't se开发者_C百科em 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 .?


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.


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


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


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


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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜