In SVN is there a command I can use to delete all locally missing files in a directory?
Or failing that, some way of listing only those files that are missing (or, i
When dealing with a lot of files, it can happen that the argument input to xargs is getting too long. I went for a more naive implementation which works in that case, too.
This is for Linux:
#! /bin/bash
# 1. get all statii in the working copy
# 2. filter out only missing files
# 3. cut off the status indicator (!) and only return filepaths
MISSING_PATHS=$(svn status $1 | grep -E '^!' | awk '{print $2}')
# iterate over filepaths
for MISSING_PATH in $MISSING_PATHS; do
echo $MISSING_PATH
svn rm --force "$MISSING_PATH"
done