Admin Life Errors, Fixes, and Encounters

22Jan/10Off

adding and deleting files in subversion

### Quick SVN script for automatically adding and deleting files
### Here's a quick bash script for automatically adding and deleting files in subversion. Don't you hate having to list each one individually? Or getting all those messages that say, "the file has already been added" when you just do svn add my/directory/*. Even more of a pain if you selectively delete a bunch of files.

# svn status | grep '^?' | sed -e 's/^? /svn add "/g' -e 's/$/"/g' | sh
# svn status | grep '^!' | sed -e 's/^! /svn delete "/g' -e 's/$/"/g' | sh

###commit a single file (CheckIn)
# svn ci index_body.php -m 'New design changes'

Comments (0) Trackbacks (0)

Sorry, the comment form is closed at this time.

Trackbacks are disabled.