You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Garrett Fitzgerald <sa...@gmail.com> on 2006/08/15 21:28:51 UTC

Fixing a suboptimal repository setup

When I set up my first repository (and second), I didn't follow the
recommended trunk/tags/branches structure - I just put everything in
the main directory. What's the best way to fix this? Follow the
instructions for migrating a repository at
http://svnbook.red-bean.com/en/1.0/ch05s03.html#svn-ch-5-sect-3.5, but
do it to the same directory after fixing the structure?

After that, I'll want to point TortoiseSVN from myProject to
myProject/trunk, correct?

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixing a suboptimal repository setup

Posted by Garrett Fitzgerald <sa...@gmail.com>.
On 8/15/06, Ryan Schmidt <su...@ryandesign.com> wrote:
> The history is not lost, of course; Subversion never loses data;
> that's the point. You can still say
>
> svn log $REPO/path/to/old/location/of/foo@42

Right, but that's a pain. :-) I decided it would be easier to just
merge in the version before the bad move, delete the trunk files, and
move them the right way.

(I'm using TSVN, which is why I'm describing what I'm doing instead of
giving code.)

Also, sorry I forgot that the default here is to reply only to the
sender, not the list.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixing a suboptimal repository setup

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 16, 2006, at 01:46, Garrett Fitzgerald wrote:

>>> After that, I'll want to point TortoiseSVN from myProject to
>>> myProject/trunk, correct?
>>
>> Yes, you'll want to have everybody with a working copy do a switch to
>> the new location:
>
> Yup, that worked.
>
> The only place where it fell down was when I did a regular move
> instead of an SVN move, so I lost the history for the files (not too
> much, I've only had this up for a few days.) Can I restore this
> somehow, or am I out of luck now that I've committed?

You would have had to have done more than that to appear to lose your  
history... maybe you did this?

mv foo bar/foo
svn delete foo
svn add bar/foo
svn ci -m "moving foo to bar/foo the wrong way"

The history is not lost, of course; Subversion never loses data;  
that's the point. You can still say

svn log $REPO/path/to/old/location/of/foo@42

where "42" is the last revision in which foo existed at the old  
location.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Fixing a suboptimal repository setup

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 15, 2006, at 23:28, Garrett Fitzgerald wrote:

> When I set up my first repository (and second), I didn't follow the
> recommended trunk/tags/branches structure - I just put everything in
> the main directory. What's the best way to fix this? Follow the
> instructions for migrating a repository at
> http://svnbook.red-bean.com/en/1.0/ch05s03.html#svn-ch-5-sect-3.5, but
> do it to the same directory after fixing the structure?

No need to migrate anything. Just take a working copy of the project,  
make the trunk, branches and tags directories, move everything else  
into trunk, and commit. Forgive my pseudocode for-loop:

svn co $REPO/myProject workingcopy
cd workingcopy
svn mkdir trunk branches tags
for each $ITEM other than (trunk branches tags) begin
	svn mv $ITEM trunk
end
svn ci -m "Moving entire project into trunk directory"


> After that, I'll want to point TortoiseSVN from myProject to
> myProject/trunk, correct?

Yes, you'll want to have everybody with a working copy do a switch to  
the new location:

cd workingcopy
svn switch $REPO/myProject/trunk


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org