Svn: ignore locally on computer?

When I exclude files from SVN using svn:ignore , and then another person tries to lock the files, does svn lock it? or should he do the same command on his computer?

+4
source share
3 answers

When I exclude files from SVN using svn: ignore, and then another person tries to lock the files, does svn lock it?

No, svn: ignore, just define a file template that, if not verified and exists inside the WC, will be filtered out from the output svn status svn add *

should he execute the same command on his computer?

svn: ignore is a versioned property of a folder saved, with other versioned data, in the repository . If you transfer this data and other side updates of your own WC for this (or later) version, the folder in it will have the same svn settings: ignore

+4
source

Imagine you have a bunch of Java files ( *.java ). They are collected in *.class files. Compiled *.class files should not be stored in Subversion.

Now imagine that the developer, who created a bunch of new *.java files, compiled them, was pleased with the results, and did this:

 $ svn add * 

In this case, Subversion will be fun to add *.class to all compiled files. Not what you want ...

The svn:ignore property is located in the directory in which you want to ignore files. If and only if the file is not already in Subversion, the file will not be displayed if the file matches the svn:ignore glob template in the file, and the user makes svn status or svn add with empty cards.

With the svn status these files will not be displayed with a mark ? at the beginning of lines of output. If a user tries to add using a wildcard, Subversion will ignore these files.

In the above scenario, if the developer did this:

 $ svn add * 

The svn:ignore property will prevent the addition of *.class files.

However, if the user specifically adds an ignored file:

$ svn add foo.class

Subversion will then not ignore the file. And, as soon as it is added to the repository, Subversion will report it if the file is modified or deleted.

The svn:ignore property is displayed to all users who have checked this version of the directory. This is a great way to prevent files from being added accidentally, but that can't stop someone from actually adding them.

I have a pre-commit hook that can take a step forward. With it, you can prevent users from adding specific files to the repository. You can also force users to install svn:ignore when creating a new directory.

+5
source

The ignore property does not prevent anyone from adding files. This only prevents disruptive actions from listing files that match patters that are listed as “unknown” when performing actions such as “svn status”.

However, it must be tied to the archive so that all users can see it.

+1
source

Source: https://habr.com/ru/post/1398892/


All Articles