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?
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.
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 .
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…
svn pg -R svn:ignore .
...with pg
being a shorthand notation for propget
, so this is equal to...
svn propget -R svn:ignore .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With