You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Joe Korzeniewski <jo...@vortex-tech.com> on 2008/06/11 20:59:54 UTC

I deserve flames, but need help regardless...

When I created this particular svn repo, I checked in what should be 
under trunk under the root of the repo. Now I am at a point where I 
realize that this project may get complicated enough to need branching 
and tagging (I know, I should have used my brain and created the trunk, 
branches and tags to begin with). My question is: how do I move the file 
structure at the root into a new root trunk folder, yet maintain 
revision history. This may be simple, but I haven't been using svn long 
and would be really bummed out if I lost my revision history.

Thanks in advance.

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

Re: I deserve flames, but need help regardless...

Posted by Joe Korzeniewski <jo...@vortex-tech.com>.
Thank you, that's exactly what I was looking for and it worked perfectly!

John Peacock wrote:
> Joe Korzeniewski wrote:
>> My question is: how do I move the file structure at the root into a 
>> new root
>> trunk folder, yet maintain revision history.
>
> It kind of depends on how large the repository is and how many working 
> copies there are.  If the project is still in its infancy, and 
> especially if you are the only person who is using it, you could do a 
> dump and reload into the preferred layout:
>
>     $ svnadmin create /path/to/newrepo
>     $ svn co file:///path/to/newrepo/ wc
>     $ cd wc
>     $ mkdir trunk branches tags
>     $ svn add trunk branches tags
>     $ svn ci -m 'Create the structure'
>     $ cd .. && rm -rf wc
>     $ svnadmin dump /path/to/oldrepo > repo.dump
>     $ svnadmin load --parent-dir trunk /path/to/newrepo < repo.dump
>
> The reason why this might be the better solution is that your history 
> will be cleaner (there won't be any messy renames), so it is easier to 
> look at the full
> history of the repo.
>
> This method will require you to throw away any existing working 
> copies; this repository will have a different UUID from the original, 
> so there is no way to convert the working copies to the new repo.  
> Additionally, your revision numbers will all be one higher, so if you 
> have a habit of referring to the revision number in log messages, this 
> will mess you up.
>
> HTH
>
> John


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

Re: I deserve flames, but need help regardless...

Posted by John Peacock <jo...@havurah-software.org>.
Joe Korzeniewski wrote:
> My question is: how do I move the file structure at the root into a new root
> trunk folder, yet maintain revision history.

It kind of depends on how large the repository is and how many working copies 
there are.  If the project is still in its infancy, and especially if you are 
the only person who is using it, you could do a dump and reload into the 
preferred layout:

	$ svnadmin create /path/to/newrepo
	$ svn co file:///path/to/newrepo/ wc
	$ cd wc
	$ mkdir trunk branches tags
	$ svn add trunk branches tags
	$ svn ci -m 'Create the structure'
	$ cd .. && rm -rf wc
	$ svnadmin dump /path/to/oldrepo > repo.dump
	$ svnadmin load --parent-dir trunk /path/to/newrepo < repo.dump

The reason why this might be the better solution is that your history will be 
cleaner (there won't be any messy renames), so it is easier to look at the full
history of the repo.

This method will require you to throw away any existing working copies; this 
repository will have a different UUID from the original, so there is no way to 
convert the working copies to the new repo.  Additionally, your revision numbers 
will all be one higher, so if you have a habit of referring to the revision 
number in log messages, this will mess you up.

HTH

John

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

Re: I deserve flames, but need help regardless...

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 11, 2008, at 15:59, Joe Korzeniewski wrote:

> When I created this particular svn repo, I checked in what should  
> be under trunk under the root of the repo. Now I am at a point  
> where I realize that this project may get complicated enough to  
> need branching and tagging (I know, I should have used my brain and  
> created the trunk, branches and tags to begin with). My question  
> is: how do I move the file structure at the root into a new root  
> trunk folder, yet maintain revision history. This may be simple,  
> but I haven't been using svn long and would be really bummed out if  
> I lost my revision history.

It's no problem :)

I would:


check out a temporary working copy
cd to the temporary working copy
svn mkdir trunk branches tags
for every item that is not trunk branches or tags
	svn mv item trunk
end
svn commit
delete temporary working copy


Done!

If you have other existing working copies that you would like to  
continue to use, you can "svn switch" them to the new location of  
those files. For example, if your repo is $REPO and you had  
previously created this working copy using "svn checkout $REPO wc",  
then now you can use "svn switch $REPO/trunk wc".



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

Re: I deserve flames, but need help regardless...

Posted by Lorenz <lo...@yahoo.com>.
Toby Thain wrote:
>[about repo reorganisation]
>The way proposed was awkward, but why not use URLs and do it without  
>a w.c.?

the difference is in the number of revisions created.

Using a WC it's only one revision for the whole reorganisation, doing
it in the repo directly results in a revision for every step.
-- 

Lorenz


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

Re: I deserve flames, but need help regardless...

Posted by Toby Thain <to...@telegraphics.com.au>.
On 11-Jun-08, at 8:10 PM, Michael Stillwell wrote:

> On Wed, Jun 11, 2008 at 9:59 PM, Joe Korzeniewski <joe@vortex- 
> tech.com> wrote:
>
>> When I created this particular svn repo, I checked in what should  
>> be under
>> trunk under the root of the repo. Now I am at a point where I  
>> realize that
>> this project may get complicated enough to need branching and  
>> tagging (I
>> know, I should have used my brain and created the trunk, branches  
>> and tags
>> to begin with). [...]
>
> If you're using TortoiseSVN (or can use it temporarily), you can:
>
>   1. Create the "trunk" directory.
>   2. Right-click drag to move the contents of / into trunk.
>   3. Commit.
>
> It's possible to do this from the command-line, but kinda awkward...

The way proposed was awkward, but why not use URLs and do it without  
a w.c.?

--Toby

> (See Ryan's reply.  This will also be easier in 1.5 if the fix for
> http://subversion.tigris.org/issues/show_bug.cgi?id=747 made it.)
>
>
>
>
> --M.
>
> -- 
> http://beebo.org
> +44 78 2118 9049
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org
>


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

Re: I deserve flames, but need help regardless...

Posted by Michael Stillwell <mj...@beebo.org>.
On Wed, Jun 11, 2008 at 9:59 PM, Joe Korzeniewski <jo...@vortex-tech.com> wrote:

> When I created this particular svn repo, I checked in what should be under
> trunk under the root of the repo. Now I am at a point where I realize that
> this project may get complicated enough to need branching and tagging (I
> know, I should have used my brain and created the trunk, branches and tags
> to begin with). [...]

If you're using TortoiseSVN (or can use it temporarily), you can:

  1. Create the "trunk" directory.
  2. Right-click drag to move the contents of / into trunk.
  3. Commit.

It's possible to do this from the command-line, but kinda awkward...
(See Ryan's reply.  This will also be easier in 1.5 if the fix for
http://subversion.tigris.org/issues/show_bug.cgi?id=747 made it.)




--M.

-- 
http://beebo.org
+44 78 2118 9049

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