ericn
ericn

Reputation: 13113

Is it normal to have .svn directory under most if not all of the subdirectories? - svn add issue

I'm new when it comes to SVN.

I suppose that there should be only 1 .svn directory under a project directory that is under version control. For example, the hierarchy of such project should be as follows:

projectdir/
   .svn/
   subdir1/
   subdir2/
   ...  

I am passed 1 project directory by a former colleague which (surprisingly) has .svn/ directory under most of the subdirectories:

projectdir/
   subdir1/
      .svn/
      ...
   subdir2/
      .svn/
      ...
   ...

I need need to put this project back onto our svn server.
I wonder if it's normal to have so many .svn/ directories under those subdirectories (I'm having issues trying to do svn add; I suspect someone did something funny with svn in the past) or I can remove all those subdirectories' .svn/ directory and only care about the .svn/ directory under the root directory of my project?

Upvotes: 8

Views: 4088

Answers (2)

Cyclonecode
Cyclonecode

Reputation: 30131

This depends on which subversion distribution you're running, prior to version 1.7 there was a .svn directory in every directory in the working copy.

Look at Apache Subversion 1.7 Release Notes

You could try to upgrade to the new format using svn upgrade

Upvotes: 10

maxim1000
maxim1000

Reputation: 6375

Before SVN 1.7 every subdirectory contained hidden ".svn" directory.

Starting from SVN 1.7 ".svn" directory is stored at the root of working copy and root of every path downloaded through svn:externals.

So either your colleague had older SVN client version, or the project uses svn:externals. If ".svn" is located in every subdirectory, "older version" is much more likely.

In any case you shouldn't simply delete the directories. If it's because of older SVN client, just try to work with this copy through newer TortoiseSVN - it will suggest working copy upgrade. Or simply check out a new working copy.

Upvotes: 4

Related Questions