hessiess
March 31st, 2009, 11:39 PM
While looking for a solution to the problem of easily adding and removing files automatically form an SVN repo I came across these commands:
svn status | awk '/^?/ {print $2}' | xargs svn add
svn status | awk '/^!/ {print $2}' | xargs svn remove
While these work prefectilly if there are no spaces in the file names, they fail if there are spaces. What would I need to do to make it support spaces, and also add the possibility of excluding files and directories?
Thanks.
svn status | awk '/^?/ {print $2}' | xargs svn add
svn status | awk '/^!/ {print $2}' | xargs svn remove
While these work prefectilly if there are no spaces in the file names, they fail if there are spaces. What would I need to do to make it support spaces, and also add the possibility of excluding files and directories?
Thanks.