开发者

svn problem. I can't add it because it's already in another SVN

开发者 https://www.devze.com 2022-12-18 01:27 出处:网络
svn add guess_language/ svn: warning: \'guess_language\' is already under version control Why is this? When I downloaded it, it was unde开发者_如何学JAVAr SVN. (I downloaded it from SVN)
svn add guess_language/
svn: warning: 'guess_language' is already under version control

Why is this? When I downloaded it, it was unde开发者_如何学JAVAr SVN. (I downloaded it from SVN) How do I release that svn...so that I can turn it into a regular directory?


Remove the .svn directory inside guess_language/ and it's parent (if that also came from another SVN repository). This should allow you to add it to another SVN repository.

This also must be done recursively through guess_language's children. A command which can do this for you (depending on your Linux environment) is:

find . -name '.svn' -type d -exec rm -rf {} \;

(You probably shouldn't just take that for granted, test it with a non-deleting version, i.e find . -name '.svn' -type d and check the only directories listed are the ones you want to remove.)


you can force it to be added to your repository. Use:

svn add --force [folder]


Inside the guess_language directory there will be a hidden directory called .svn. This is how SVN knows that the directory is under version control. Delete that directory and you will then be able to add it to your SVN repository. You will have to do this for every directory, as each directory will have its own .svn directory.

(As an aside, if you look at the contents of a file called entries inside that directory, you can see the url of the SVN repository that the directory originally belonged to)


If you want a "copy" of the directory out of version control, use svn export. The exported directory will contain all the under version control contents of the original one, but will be a "regular directory".

Best regards.


Nuke all the .svn directories.

cd guess_language
find . -name .svn | xargs rm -fr


As the others said, remove the .svn directories to make subversion forget that it's a working copy checkout out from some repository. In the future you can svn export instead of svn checkout to download the files from svn without creating a working copy from them.

0

精彩评论

暂无评论...
验证码 换一张
取 消