Add all non-versioned controlled files to the subversion repository
Thursday, February 15, 2007 at 05:34PM
Wayne Robinson in programming

Just wrote a small one-liner to add all non-version controlled files in the current path and down to a subversion repository without any unecessary warning messages or errors.

svn st | \
  grep -E "^\?" | \
  sed -e s/^\?\\s*//g | \
  sed -e s/\\s/\\\\\ /g | \
  xargs -I{} svn add {}

I have only tested this on Cygwin so far, but it should work fine on Linux and Mac OS X.

Article originally appeared on Wayne Robinson's Blog (http://wayne-robinson.com/).
See website for complete article licensing information.