[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: Nick Stolwijk <nick.stolwijk_at_gmail.com>
Date: Wed, 16 Sep 2009 00:58:37 +0200

> The repository does not contain user data, it contains the version
> information of the user data.

Your versioned data lives in the repository. The repository holds all
the information, data and version information.

> All the userdata is in the Working Copy created by 'svn co'.

Your local changes go into a working copy created by svn co.
Everything you do there are local changes, not yet committed to the
repository.

> My initial mistake was to attempt to create the Working Copy on the same
> directory where the original data lives.

After the initial import there is no notion anymore of original data.
Move it somewhere out of the way, just for when you screw up your
repository. You're done with it.

> My problem was solved by creating a temp directory and creating the Working Copy in it leaving the original data untouched. Does this sound right?

No. ;) Create your working copy in a normal location. This is where
you do all your work, hence the name Working Copy. ;)

> Here's what I did
>
> Create the repository
> $ svnadmin create /home/jdoe/svnrepo1

So far, so good.

> Import your data into the repository
> $ cd xdatadir
> $ svn import file:///home/jdoe/svnrepo1

Very good, your initial data is in your repository. You're done with
the initial data. Move it out of the way:

$ mv xdatadir xdatadir.backup

> Checkout the resource into the placeholder
> $ svn checkout file:///home/jdoe/svnrepo1 /home/jdoe/mytmp/

No placeholder:
$ svn checkout file:///home/jdoe/svnrepo1 /home/jdoe/xdatadir

This is your working copy.

> Then I added text to dir1/file1_dir1

Try doing your 'svn stat' and 'svn diff' now. You will see you have
local changes (changes between your original working copy and your
current state.

> and did a commit,

Good, you've added revision 2 to your repository. Your working copy
should now be at revision 2 and thus show no changes when you do svn
stat.

> then a 'svn diff' but nothing showed until quite a few minutes later although the file in the
> .svn/text-base directory showed the changes. Why is there a time lapse from
> the commit state to when diff shows the changes?

Don't look into the .svn directories. ;) Try to understand the svn
commands first.

> All this while the changes only occur in the Working Copy. I was expecting
> that when I do 'commit' the changes would go to the original xdatadir, but
> this does not happen.

It won't go to your original xdatadir, you were done with it,
remember. ;) It will go as a revision into your repository.

> Everything stays in /home/jdoe/mytmp.
Fortunately so. :)

Hth,

Nick Stolwijk
~Java Developer~

IPROFS BV.
Claus Sluterweg 125
2012 WS Haarlem
http://www.iprofs.nl

On Wed, Sep 16, 2009 at 12:09 AM, perm 2600 <perm2600_at_gmail.com> wrote:
>
>
> On Mon, Sep 14, 2009 at 11:12 AM, perm 2600 <perm2600_at_gmail.com> wrote:
>>
>> Hi -- first post here.
>>
>> <snip>
>
> I think I've understood the concept of "Working Copy" a bit better.
>
> The repository does not contain user data, it contains the version
> information of the user data. All the userdata is in the Working Copy
> created by 'svn co'.
>
> My initial mistake was to attempt to create the Working Copy on the same
> directory where the original data lives. My problem was solved by creating a
> temp directory and creating the Working Copy in it leaving the original data
> untouched. Does this sound right?
>
> Here's what I did
>
> Create the repository
> $ svnadmin create /home/jdoe/svnrepo1
>
> Create a placeholder
> $ mkdir /home/jdoe/mytmp
>
> Import your data into the repository
> $ cd xdatadir
> $ svn import file:///home/jdoe/svnrepo1
>
> Checkout the resource into the placeholder
> $ svn checkout file:///home/jdoe/svnrepo1 /home/jdoe/mytmp/
>
> Verify that the data was checked out
> $  tree /home/jdoe/mytmp
> ../mytmp/
> |-- dir1
> |   |-- file1_dir1
> |   `-- file2_dir1
> `-- dir2
> |-- file1_dir2
> `-- file2_dir2
> 2 directories, 4 files
>
> Then I added text to dir1/file1_dir1 and did a commit, then a 'svn diff' but
> nothing showed until quite a few minutes later although the file in the
> .svn/text-base directory showed the changes. Why is there a time lapse from
> the commit state to when diff shows the changes?
>
> All this while the changes only occur in the Working Copy. I was expecting
> that when I do 'commit' the changes would go to the original xdatadir, but
> this does not happen.
> Everything stays in /home/jdoe/mytmp.
>
> I'm trying my best to put the pieces together so please feel free to give me
> any feedback so I may learn this app.
>
> Thanks so far to all that responded. Every response had a bit of the puzzle.
>
> /perm
>

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

To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-09-16 00:59:41 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.