11.07.2015 Views

Version Control with Subversion - Login

Version Control with Subversion - Login

Version Control with Subversion - Login

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Advanced Topicsbasic usage level tends to suit the majority of <strong>Subversion</strong> users.When found on a versioned directory, the svn:ignore property is expected to contain alist of newline-delimited file patterns that <strong>Subversion</strong> should use to determine ignorable objectsin that same directory. These patterns do not override those found in the globalignoresruntime configuration option, but are instead appended to that list. And it's worthnoting again that, unlike the global-ignores option, the patterns found in thesvn:ignore property apply only to the directory on which that property is set, and not toany of its subdirectories. The svn:ignore property is a good way to tell <strong>Subversion</strong> to ignorefiles that are likely to be present in every user's working copy of that directory, such ascompiler output or—to use an example more appropriate to this book—the HTML, PDF, orPostScript files generated as the result of a conversion of some source DocBook XML filesto a more legible output format.<strong>Subversion</strong>'s support for ignorable file patterns extends only to the one-timeprocess of adding unversioned files and directories to version control. Once anobject is under <strong>Subversion</strong>'s control, the ignore pattern mechanisms no longerapply to it. In other words, don't expect <strong>Subversion</strong> to avoid committingchanges you've made to a versioned file simply because that file's namematches an ignore pattern—<strong>Subversion</strong> always notices all of its versioned objects.Ignore Patterns for CVS UsersThe <strong>Subversion</strong> svn:ignore property is very similar in syntax and function to theCVS .cvsignore file. In fact, if you are migrating a CVS working copy to <strong>Subversion</strong>,you can directly migrate the ignore patterns by using the .cvsignore file as inputfile to the svn propset command:$ svn propset svn:ignore -F .cvsignore .property 'svn:ignore' set on '.'$There are, however, some differences in the ways that CVS and <strong>Subversion</strong> handleignore patterns. The two systems use the ignore patterns at some different times, andthere are slight discrepancies in what the ignore patterns apply to. Also, <strong>Subversion</strong>does not recognize the use of the ! pattern as a reset back to having no ignore patternsat all.The global list of ignore patterns tends to be more a matter of personal taste and ties moreclosely to a user's particular tool chain than to the details of any particular working copy'sneeds. So, the rest of this section will focus on the svn:ignore property and its uses.Say you have the following output from svn status:$ svn status calcM calc/button.c? calc/calculator? calc/data.c? calc/debug_log? calc/debug_log.1? calc/debug_log.2.gz? calc/debug_log.3.gz54

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!