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.
--
Les Mikesell
lesmikesell_at_gmail.com
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2394732
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-14 20:42:09 CEST