[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: unversioned directory of the same name already exists

From: Johan Corveleyn <johan.corveleyn_at_uz.kuleuven.ac.be>
Date: Mon, 14 Sep 2009 21:47:48 +0200

> Van: Les Mikesell [mailto:lesmikesell_at_gmail.com]
> perm 2600 wrote:
> > Hi -- first post here.
> >
> > I'm completely new to version control and wanted to get my feet
> wet with
> > subervsion.
> >
> > I've read the relevant part about my question in the svn book. In
> page
> > 154 it
> > says that a repository can be deleted with the 'rm' unix command,
> which I
> > did.
> >
> > I did a first run with svn to create a repo (svnrepo1) and
> created the test
> > dir (xdatadir) from scratch. Then I decided to do it again but
> hit a snag.
> >
> > My test dir looks like this:
> > $ tree xdatadir
> > xdatadir
> > |-- dir1
> > | |-- file1_dir1
> > | `-- file2_dir1
> > `-- dir2
> > |-- file1_dir2
> > |-- file2_dir1
> > `-- file2_dir2
> >
> > Removed the repo I created in my first attempt.
> > $ rm -rf /home/jdoe/svnrepo1
> >
> > Then I tried to create the repo again
> >
> > $ svnadmin create /home/jdoe/svnrepo1
> >
> > Importing was not a problem.
> >
> > $ svn import xdatadir/ file:///home/jdoe/svnrepo1 -m "First
> Import"
> > Adding xdatadir/dir1
> > Adding xdatadir/dir1/file1_dir1
> > Adding xdatadir/dir1/file2_dir1
> > Adding xdatadir/dir2
> > Adding xdatadir/dir2/file2_dir1
> > Adding xdatadir/dir2/file1_dir2
> > Adding xdatadir/dir2/file2_dir2
> >
> > But when I try to 'checkout' I get the following error:
> >
> > $ svn checkout file:///home/jdoe/svnrepo1 xdatadir/
> > svn: Failed to add directory 'xdatadir/dir1': an unversioned
> directory
> > of the
> > same name already exists
> >
> > Why does it say that the directory exists if I had removed it
> earlier?
> > Can this be fixed?
> >
> > The status shows the '?' for dir1 and dir2 indicating that they
> are not
> > under version control.
> >
> > $ svn status
> > ! .
> > ? dir1
> > ? dir2
> >
>
>
> I think you are confusing the repository and your working copy
> which are
> different things. Everything looked OK up through importing your
> unversioned tree into the repository. Now when you check it back
> out,
> you are expected to create a new working copy in a different/empty
> place
> so the working copy can be created with the versioning metadata.
> It is
> possible to force the original files to be re-used but that's not
> typical. Normally your working copy is treated as expendable and
> just
> checked out from scratch any time you might want a new one, but you
> might want to keep your original tree around (perhaps rename the
> top
> level) until you are confident that your repository copy is good.

Yes. What you've tried to do is an "in-place import".

See http://subversion.tigris.org/faq.html#in-place-import

Regards,
Johan

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2394753

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-14 21:48:35 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.