When I am in a directory using SVN and select to ignore the extension does this affect the whole project?

StackOverflow https://stackoverflow.com/questions/21389687

  •  03-10-2022
  •  | 
  •  

Domanda

There is a sub-directory of my site, /mysite/admin/logs, and I would like to configure SVN to ignore the log files in this directory. The log files have an extension, say ".MYEXT" that is NOT unique to only log files. Other directories in the project contain files with the same extension which are needed in SVN. I would like to ignore all the ".info" files in the current directory (non-recursive) but not anywhere else in the project.

When using SVN, I right click while inside the log directory and find the option to ignore. If I select the option "*.MYEXT" will this only ignore the ".MYEXT" files in the current directory or does it cause all the files with the ".MYEXT" extension to be ignored in the entire project?

È stato utile?

Soluzione

In Tortoise 1.8.4 you have the option to ignore only in this directory, or recursively, when you select the file. For example, when I right click and select Ignore for foo.xyz file I see 4 options in the ignore menu:

  • foo.xyz
  • *.xyz
  • foo.xyz (recursively)
  • *.xyz (recursively)

In general, when you ignore a file it only affects the directory you are in. SVN creates/updates the svn:ignore property on the directory (see here). If you look at this section of the documentation you'll find this section (bolding mine):

When found on a versioned directory, the svn:ignore property is expected to contain a list of newline-delimited file patterns that Subversion should use to determine ignorable objects in that same directory. These patterns do not override those found in the global-ignores runtime configuration option, but are instead appended to that list. And it's worth noting again that, unlike the global-ignores option, the patterns found in the svn:ignore property apply only to the directory on which that property is set, and not to any of its subdirectories. The svn:ignore property is a good way to tell Subversion to ignore files that are likely to be present in every user's working copy of that directory, such as compiler output or—to use an example more appropriate to this book—the HTML, PDF, or PostScript files generated as the result of a conversion of some source DocBook XML files to a more legible output format.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top