Is it safe to delete the contents of .svn/pristine?

怎甘沉沦 提交于 2019-12-12 09:28:52

问题


I'm working with a large application I've checked out from my repository, the bulk of this app is in the .svn/pristine folder. From what I understand, the pristine folder contains copies of the files in my workingCopy directory

That being said,

  • Would it be okay to delete these files?
  • Do I really need them?

I have my files backed up already and no intention to revert. The extra space gained would dramatically cut my compile time as well.

EDIT

I now understand that changing anything manually inside .svn will likely break my workingCopy.

I need to find a way to reduce the size of my workingCopy. In TortoiseSVN, there is a Cleanup - Delete unversioned files and folders, which "removes all generated files in your working copy". Perhaps this would get rid of those files without breaking my application?

Cheers


回答1:


  • You must not touch the directory .svn in your working copy manually. The directory is required for client-side operations.

  • The .svn directory stores working copy metadata and pristine copy of WC files for client-side operations only, it must exist in each SVN working copy but not in SVN repository. Storing it in Subversion repository can lead to errors on the client side.

    In other words, you must not store the directory .svn in the repository. If you have this directory in the repository then someone has mistakenly committed it; remove it from the latest revision or remove it completely by filtering it out using svndumpfilter tool.

    See SVNBook | Subversion Working Copies:

    A working copy also contains some extra files, created and maintained by Subversion, to help it carry out these commands. In particular, each working copy contains a subdirectory named .svn, also known as the working copy's administrative directory. The files in the administrative directory help Subversion recognize which of your versioned files contain unpublished changes, and which files are out of date with respect to others' work.

  • The option "Cleanup - Delete unversioned files and folders" in TortoiseSVN will remove unversioned files in your working copy. E.g., those files that were ignored via svn:ignore property, files generated after you run build or debug.

    I guess that you store large binaries in your repository / working copy. I don't think that you'll be able to solve the working copy size issue without reorganizing your SVN repository.




回答2:


You may try to launch svn cleanup. It will remove unnecessary files from .svn/pristine.




回答3:


It turns out that my real reason for the long build was Eclipse's validators! I turned off all validators for JavaScript and the build happens almost instantly. Unbelievable.



来源:https://stackoverflow.com/questions/22714362/is-it-safe-to-delete-the-contents-of-svn-pristine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!