Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I view all ignored patterns set with svn:ignore recursively in an SVN repository?

Tags:

grep

svn

awk

I see it is possible to view a list of properties set on every directory within an SVN repository using proplist and the -R flag (recursive) and -v flag (verbose):

svn proplist -Rv 

This shows me all properties, such as svn:mime-type or svn:executable. I'm looking to filter this to just svn:ignore properties. I'm sure there is some way to pipe the result from this command through a shell command that would only show me the lines I'm interested in, but I can't figure out how to do it. As an example of the type of thing that would be most useful is some type of command like this (but this one doesn't work!).

svn proplist -Rv | grep "^  svn:ignore" | awk "{print \$1}" 

I just don't know enough about shell commands like grep and awk to make this work for me. This just shows "svn:ignore" over and over again, but it doesn't print out the directory path or contents of the svn:ignore property. Here is an example of the output from "svn proplist -Rv" that I'd like to grab, where 'cache' is the path and '*' is the value of the property.

Properties on 'cache':   svn:ignore     * 

How can the above command be made to work and/or is there a better way to view all svn:ignore properties in my repository?

like image 772
stereoscott Avatar asked Aug 09 '09 20:08

stereoscott


People also ask

Where is svn ignore stored?

svn:ignore is applied to directories and is non-recursive or inherited. Any file or immediate subdirectory of the parent directory that matches the File Pattern will be excluded. (So the file ./subdirectory/ignoreThis is not ignored, even though " ignoreThis.

How do I ignore target folder in svn?

To ignore files in subversion you want to set the svn:ignore property. You can see more here http://svnbook.red-bean.com/en/1.8/svn.advanced.props.special.ignore.html about half way down. svn propset svn:ignore target .

How do I delete a file from svn?

To remove a file from a Subversion repository, change to the directory with its working copy and run the following command: svn delete file… Similarly, to remove a directory and all files that are in it, type: svn delete directory…


1 Answers

svn pg -R svn:ignore . 

...with pg being a shorthand notation for propget, so this is equal to...

svn propget -R svn:ignore . 
like image 127
Martin v. Löwis Avatar answered Sep 22 '22 05:09

Martin v. Löwis