[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn add fails with directory is already under version control

From: Hari Kodungallur <hkodungallur_at_gmail.com>
Date: Tue, 27 Jan 2009 12:28:50 -0800

On Sun, Jan 25, 2009 at 6:15 PM, <mark.durman_at_esbsupport.com> wrote:

> I'm using Subversion as my repository and Ant as my build/test tool.
> My Ant build deletes certain subdirectories (bin, classes, etc.), creates
> new, empty versions of those subdirectories, then compiles the java code.
> The resulting binaries end up in the bin subdirectory, the classes in the
> classes subdirectory, etc.
> I add the dirs and files, then commit the changes to Subversion.
> I run the build script again, which goes through the same process.
> This time, when I attempt to check files in, svn add failes with a message
> that the directories are already under version control.
> This seems like a standard build life-cycle to me. Am I doing something
> wrong, or misunderstanding how svn works?

Typically, the artifacts of a build are not checked back into the version
control system. One of the goals of the build system should be to achieve
repeatability. You should be able to repeat a build from a particular
revision of the source code and should always get the exact same result. If
that is achieved, then all you need is the code line to be version
controlled. The bins and libs etc are just result of a build that you can
get at any point of time.

My suggestion is to not check in these binaries and libraries. Artifacts of
a build that was released can be archived in other forms (external drive,
dvds etc).

If you have to check them in, then you have to delete those directories from
svn (using 'svn del" and not just removing locally) and then add them back



To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-01-27 23:02:31 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.