4

I have googled and search through the documentation. I get stuck on this.

Do you know where the list of ignored files by subversion is located ?

Stephan
  • 41,764
  • 65
  • 238
  • 329

2 Answers2

5

You can find the default global file ignore list in the auto-generated user specific config file, in a commented-out line (key global-ignores in section miscellany). For example, in a file generated by Subversion 1.8:

# global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
#   *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db

The file location varies between operating systems; under Linux/UNIX the default is ~/.subversion/config.

Alternatively, you can directly look for the default ignore list in the Subversion source code archive file (subversion/include/svn_config.h, search for GLOBAL_IGNORE_LINE).

Example (Subversion 1.9):

#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_1 \
  "*.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__"
#define SVN_CONFIG__DEFAULT_GLOBAL_IGNORES_LINE_2 \
  "*.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db"
maxschlepzig
  • 35,645
  • 14
  • 145
  • 182
  • What is the file location for Windows? (maybe Mac OS too) – Stephan Sep 23 '17 at 05:11
  • 1
    @Stephan, on Mac OSX it should be the same as on Linux, on Windows it is `%appdata%\subversion\config` (cf. [Where is the user's Subversion config file stored on the major operating systems?](https://stackoverflow.com/a/10617826/427158)). – maxschlepzig Sep 23 '17 at 08:02
1

depends - you used to store it in a local file, per user. (either global-ignores section of the config, or registry depending on OS platform).

Now they moved it to a svn property so its stored in the repository. Its called svn:global-ignores and gets used automatically.

Personally, I used to put them in the pre-commit hook and reject any commits with banned file types.

gbjbaanb
  • 51,617
  • 12
  • 104
  • 148
  • 1
    I wouldn't say that we moved it. We just added a new property that behaves likes svn:ignore but is inherited by children from their parents. All 3 of the different methods are combined to determine the ignore list. https://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config – Ben Reser Dec 21 '13 at 03:03