svn:ignore - how does it work?
I have difficult in understanding the svn:ignore property. It would be nice if someone could help me on this.
I checked out a grails web app from a svn repository that has svn:ignore property applied for *.log files and /target folder. Obviously, when I checked out the *.log files and /target folder was missing. After working on this grails app on my local working copy, the /target directory and *.log files gets created. Now, when I commit the changes into the svn repo, will the /target files and *.log files get committed too?开发者_如何学Go or will they be automatically ignored because of the svn:ignore property already existing on the svn copy of the grails app?
Hope I have made myself clear.
Thanks for any help offered.
The svn:ignore property contains a list of file patterns which certain Subversion operations will ignore. Perhaps the most commonly used special property, it works in conjunction with the global-ignores run-time configuration option (see the section called “Config”) to filter unversioned files and directories out of commands svn status, svn add, and svn import.
The rationale behind the svn:ignore property is easily explained. Subversion does not assume that every file or subdirectory in a working copy directory is intended for version control. Resources must be explicitly placed under Subversion's management using the svn add or svn import commands. As a result, there are often many resources in a working copy that are not versioned.
Now, the svn status command displays as part of its output every unversioned file or subdirectory in a working copy that is not already filtered out by the global-ignores option (or its built-in default value). This is done so that users can see if perhaps they've forgotten to add a resource to version control.
But Subversion cannot possibly guess the names of every resource that should be ignored. Also, quite often there are things that should be ignored in every working copy of a particular repository. To force every user of that repository to add patterns for those resources to their run-time configuration areas would be not just a burden, but has the potential to clash with the configuration needs of other working copies that the user has checked out.
The solution is to store ignore patterns that are unique to the resources likely to appear in a given directory with the directory itself. Common examples of unversioned resources that are basically unique to a directory, yet likely to appear there, include output from program compilations. 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.
Reference:
http://svnbook.red-bean.com/en/1.1/ch07s02.html
The svn:ignore property contains a list of file patterns or directory names which certain Subversion operations will ignore. If you commit the changes into the svn repo, the /target files and *.log files will not be committed and they are automatically ignored because of the svn:ignore property that already exists on the svn copy of the grails app.
精彩评论