collected: svn relocate & add all subdirs but not…
14:
After some changes in our infrastructure@work svn failed to find the server… (svn info shows you the url). huh, seen&solved years ago… and now here so I can’t miss the information in the future.
~>svn switch --relocate <old_addr> <new_addr>
I also found a piece of old script I wrote years ago for adding subdirs in svn but not a given set of name directorys and file-extensions:
#!/bin/bash
######################################################################
# script add all but not aabn.sh
# add all files not versioned in and below the current dir to the svn
# exeptions: ignore_dir and ignore_file_suffix (seperated by |)
######################################################################
#ignore directory paths with names...
ignore_dir="release|debug|web"
#ignore files with names...
ignore_file_suffix="o|pdf"
list=`svn status | grep ? | awk {'print $2'}`
for l in $list
do
to_add=`echo "$l \<($ignore_dir)\> \<($ignore_file_suffix)\>$" \
| awk '{
where = match($1, $2)
if (!where) {
where = match($1, $3)
if (!where)
print 1
else
print 0
} else
print 0
}'`
if [ $to_add -gt 0 ] ; then
echo "+++ADDITION+++"$l
svn add $l
else
echo "---IGNORE---"$l
fi
done
By commenting out the „svn add$I“ you can do a „try run“.