Archive for the ‘Subversion’ Category

h1

SVN add all waiting files

September 7, 2011

If you would like to add all pending files to svn via an svn add command, the following works quite nicely:


svn status | grep ? | sed 's/^? \(.*\)/\1/g' | xargs svn add

And the same for removing missing files:


svn status | grep ! | sed 's/^! \(.*\)/\1/g' | xargs svn rm

h1

How to ignore files in a directory under subversion control

June 11, 2010

First thing to realise is that you don’t ignore a file, you set ignored files on the directory.

# ---------------------------------------------------------------------
# Ignore all the .txt files in the /trunk/Blah/ directory
# --------------------------------------------------------------------- 
# Go to the directory cd trunk/Blah/ 
# The directory with the files # Start editing the properties for the current directory svn propedit svn:ignore . 
# Opens an editor (SVN_EDITOR, EDITOR) 
# Add the following value with a new line, save, and exit: *.txt 
# See that things worked svn propget svn:ignore . 
# So you can see the properties svn status --no-ignore 
# You should see an 'I' next to the ignored files 
# Commit svn commit -m "New Ignores" # You must commit the new property change