简体   繁体   中英

Adding .svn file to all files

I removed .svn files from all directories in order to reduce file size. Now i want to add .svn file in all directories. Is it possible to add again .svn file to all directories as what these were previous.

EDIT

Actually i wanted to copy my whole code to pen drive. Size was 12 GB. It was copied in speed of bits range. For time consumption i removed all .svn files.After removing .svn from all directories ,i got size as 7 GB. Unfortunately i forot to take backup. After removing all .svn files, i came to know that i dont have any back for this. Now i want to add .svn file for all directories.Because if i do fresh checkout it will take more and more time. That is why i asked Is there any possibilities to add .svn files again. I also have most aware about svn .By my mistake it was happened. If i get any solution for this, it will be easy. So only i asked this question.

The .svn is a directory . In Subversion clients 1.6 and lower, they appeared in each directory under Subversion's control. In Subversion 1.7 and higher, it is only in the root of the working directory.

The .svn directory does take up space. In the pre-1.6, it actually contained a duplicate entry of each file you checked out -- more than doubling the size of the working directory. However, removing it breaks your working directory. Subversion no longer knows where you did your checkout from, the state of the checkout, or any other information. If you don't need the .svn files (for example, you're doing a deployment), you can use svn export which downloads all the files, but leaves out the .svn directories.

You don't explain why you removed and now want to add these directories back in. You can't simply regenerate them. You'll have to do a new checkout of your project, use some sort of diff between the old working directory and the new one to figure out the changes, and copy those changes back into your working directory. In Ubuntu, you can use diff -r --brief to find which files differ (ignoring all the .svn warnings about being only in one directory). If you're really good, you can use diff to create a patch to apply to the new working directory.

If you are exporting the repository, use svn export . If you are doing development, use svn checkout and don't touch those .svn directories.

Room shouldn't be an issue any more when computers now come with 1/2 a terabyte of disk space by default. You can limit your checkout by only checking out the project you need or by using a sparse checkout .

I also recommend you use SVN 1.7 or better which should work with any Subversion server out there. Earlier versions are no longer supported.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM