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

Bug report: "svn add" does not warn or refuse when trying to add a folder with existing .svn folders

From: Petar Bogdanov <petar.bogdanov_at_mentormate.com>
Date: Fri, 07 Oct 2011 14:02:01 +0300

This is not the first time I have come across this.

Steps to reproduce:
1. Copy an entire folder from one repository to another
2. "svn add" happily adds the folder with its .svn subfolders, all of
them point to another repository. (Bad)
3. "svn commit" commits, usually without error, making the user think
everything was correct. (Worse)
4. "svn update" on another machine refuses to work and says "the folder
is from another repository". (Too late)

I think this behavior is a major source of repository breakage for "new"
users such as myself and the fix is really easy to do.

How to fix:
Make "svn add" check for ".svn" subfolders when trying to add a tree
into the repository. There absolutely no reason why folders new to the
repository should already contain ".svn" subfolders
It should refuse to do anything until the ".svn" folders are removed.

The current workaround is to:
1. copy the folder with another name
2. strip its .svn subfolders
3. "svn rm" the old folder
4. "svn commit" so the name is freed up
5. rename it back to its original name
6. "svn add" with the old name
7. "svn commit"

I think you will all agree this is too tedious for such a simple
operation, making Subversion much more cumbersome than usual, to use.
Received on 2011-10-07 13:51:42 CEST

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.