A ‘build’ directory in my project needs to be deleted and created again after every check out.
Here is what I do which is kind of a long and cumbersome process and creates a large number of unnecessary commits:
$ svn delete build
$ svn commit -m "build directory deleted..." [Unnecessary commit]
$ svn update
$ mkdir build [to create a fresh empty directory of build]
$ cd build [perfom operations in build]
$ svn add build
$ svn commit -m "New revision having following XYZ changes"
Problem:
Is there a workaround to avoid the redundant commit just after delete? I just want to delete everything related to my project inside the ‘build’ directory to be deleted so that I may create new versions of them. Following steps, which I thought should have worked, give problems
$ svn delete build
$ rm -r build
$ mkdir build
$ svn add build
$ svn commit -m "New revision having following XYZ changes"
A build directory is not something you typically want in a repository. What you should ideally be doing is 1) Ignore the build directory from svn using the
svn:ignoreproperty, 2) remove or create the build directory using your build scriptThis way you will also avoid having any (needless) commits in your repository which just create or remove the build directory.