Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

linux

unix

svn

svn add guess_language/
svn: warning: 'guess_language' is already under version control

Why is this? When I downloaded it, it was under SVN. (I downloaded it from SVN) How do I release that svn...so that I can turn it into a regular directory?

like image 230
TIMEX Avatar asked Jan 23 '10 00:01

TIMEX


People also ask

How do you svn add all files?

To add an existing file to a Subversion repository and put it under revision control, change to the directory with its working copy and run the following command: svn add file… Similarly, to add a directory and all files that are in it, type: svn add directory…

Why svn locked?

The lock tells other users that the file is being edited, and you can avoid merge issues. When you set up source control, you can configure SVN to make files with certain extensions read only. Users must get a lock on these read-only files before editing.

What is svn add?

svn add adds an item (file or directory) to a local working copy. svn add is a local operation and does not contact server. No changes made to a repository when you run svn add . It simply schedules and item to be committed to a repository next time your run svn commit .


3 Answers

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.)

like image 124
Grundlefleck Avatar answered Nov 02 '22 19:11

Grundlefleck


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

svn add --force [folder]
like image 21
Gavin H Avatar answered Nov 02 '22 21:11

Gavin H


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)

like image 1
adrianbanks Avatar answered Nov 02 '22 20:11

adrianbanks