Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

svn

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?

like image 700
ericn Avatar asked Sep 04 '13 04:09

ericn


Video Answer


2 Answers

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

like image 104
Cyclonecode Avatar answered Nov 15 '22 23:11

Cyclonecode


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.

like image 38
maxim1000 Avatar answered Nov 15 '22 23:11

maxim1000