You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by jack nimble <ja...@gmail.com> on 2012/03/07 12:56:58 UTC

SVN add Error - Not a working copy

'm trying to create a new entry in subversion for development. This is
based on a project which already exist in subversion. I don't want to have
it based on that version, because that's for reference only and can't be
changed.

I tried to export it using subclipse in sts/eclipse. However, when I import
the top level project into sts/eclipse, the project structure isn't
preserved.

The sts/eclipse project structure *is* preserved when I do a checkout. So I
checked out the project to a different directory path. Then, using cywin's
command line, I recursively removed all the .svn entries from the project
with a "find.-name".svn"-execrm-rf{} \;"

However, when I attempt to add the new project into subversion, I get an
"SVN add Error - Not a working copy" for the top level directory.

I've been checking/googling, and it this error occurs when an .svn file is
missing for the directory. So, somehow subversion is still aware of this
project despite the removal of all the .svn directories. If I go a level
higher, I'm in the "workspace" for sts, and (I don't believe) there are
.svn entries at that level.

Why does subversion think this is still a subversion project after I've
removed all the tags? How can I get this checked-out directory added as a
new entry into subversion?

Re: SVN add Error - Not a working copy

Posted by Thorsten Schöning <ts...@am-soft.de>.
Guten Tag jack nimble,
am Mittwoch, 7. März 2012 um 12:56 schrieben Sie:

> 'm trying to create a new entry in subversion for development. This is
> based on a project which already exist in subversion. I don't want to have
> it based on that version, because that's for reference only and can't be
> changed.

Older revisions won't change ever and if your new work is somehow
related to the already present data and revisions it's common to
preserve history and this relationship by copying the already present
data to a new folder within subversion. This preserves history, saves
space, is easy to achieve without any checkout etc. Your existing
project won't be changed, unless you want it and even then every
change can be reverted whenever you like.

> I tried to export it using subclipse in sts/eclipse. However, when I import
> the top level project into sts/eclipse, the project structure isn't
> preserved.

I don't really understand what you mean with that. How should the
project structure look like and how does it look like after which
operation?

> The sts/eclipse project structure *is* preserved when I do a checkout.

The only difference between checkout and export is that in the latter
no functional working copy is create. There shouldn't be any
difference in the existing folders and files if you really checkout
and export the same version of your project.

> So I
> checked out the project to a different directory path. Then, using cywin's
> command line, I recursively removed all the .svn entries from the project
> with a "find.-name".svn"-execrm-rf{} \;"

And nothing else does export, only without creating the
.svn-directories at all. Your problem war probably something else.

> However, when I attempt to add the new project into subversion, I get an
> "SVN add Error - Not a working copy" for the top level directory.

Which is ok because you deleted all the .svn directories and destroyed
your working copy. Adding is only possible in working copies, else you
have to import a directory structure into an existing repo. But again,
I wouldn't do that, just copy your project in the repo.

> I've been checking/googling, and it this error occurs when an .svn file is
> missing for the directory.

...and you deleted all of them. :-)

> So, somehow subversion is still aware of this
> project despite the removal of all the .svn directories.

It is not aware of the project and that's not what the error message
says. It says that you can't add something because subversion doesn't
know what you have because you deleted all the .svn-directories and
therefore just have a standard folder with some files, nothing
Subversion could know about.

> Why does subversion think this is still a subversion project after I've
> removed all the tags?

It doesn't think so, you misinterpret the error. You maybe want to
import something, not add.

> How can I get this checked-out directory added as a
> new entry into subversion?

Copy it in the repository or import it: svn help cp and svn help
import.

Mit freundlichen Grüßen,

Thorsten Schöning

-- 
Thorsten Schöning       E-Mail:Thorsten.Schoening@AM-SoFT.de
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon.............030-2 1001-310
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln
AG Hanover HRB 207 694 - Geschäftsführer: Andreas Muchow


Re: SVN add Error - Not a working copy

Posted by David Weintraub <qa...@gmail.com>.
On Wed, Mar 7, 2012 at 6:56 AM, jack nimble <ja...@gmail.com> wrote:
> 'm trying to create a new entry in subversion for development. This is based
> on a project which already exist in subversion. I don't want to have it
> based on that version, because that's for reference only and can't be
> changed.

Can you create a new branch? That way, you can check out and change
the branch without changing the "reference" copy.

>
> I tried to export it using subclipse in sts/eclipse. However, when I import
> the top level project into sts/eclipse, the project structure isn't
> preserved.

If you are "exporting" the project and not "checking out" the project,
you don't have a working copy.

>
> The sts/eclipse project structure is preserved when I do a checkout. So I
> checked out the project to a different directory path. Then, using cywin's
> command line, I recursively removed all the .svn entries from the project
> with a "find.-name".svn"-execrm-rf{} \;"

Those ".svn" directories give Subversion the information it needs in
order to know that this is a working copy. Remove them, and you no
longer have a working copy.

Make a branch. In Subversion, it's easy to do. Do a "svn cp" to the
"branches" directory and use that. That way, you can make your changes
without changing the "reference". If the "reference" changes, and you
need those changes, you can merge them into your copy. If you decide
that these changes should go back into the "reference", you can merge
your changes back into the "reference". This is what branching is for.

-- 
David Weintraub
qazwart@gmail.com