You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Adam Mercer <ra...@gmail.com> on 2007/09/08 04:40:09 UTC

restructuring repositories with svndumpfilter

Hi

I'm trying to restructure some of my repositories, esentially I want
to split up a single repository into multiple ones. The current layout
of my repo is

repo/
  dir1
  dir2
  dir3

and I want separate repositories with each directory, i.e.

dir1/
dir2/
dir3/

the only problem is that the history of each directory is not
independent, therefore I can't use svndumpfilter.

I have found svndumpfilter2 (from
http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/svn-tools/svndumpfilter2?view=markup)
which seems to be able to handle the case of separating directories
that share history. If I run

$ svnadmin dump repo | svndumpfilter /path/to/svn/repo dir1 > dir1.svndump

that splits repo/dir1 into a separate repository, the only problem is
that the structure of the new repository is

repo/
 dir1

not just

dir1/

as I want. I know I can move the contents of dir1 into the root
directory of the repository but does anyone know a way to get dir1 as
a separate repository?

Cheers

Adam

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

Re: restructuring repositories with svndumpfilter

Posted by Adam Mercer <ra...@gmail.com>.
On 09/09/07, Chris Frost <ch...@frostnet.net> wrote:
> An easy solution is to do something akin to 'svn mv dir1/* .; svn rm dir1'.
> However, moving between before and after this checkin will be a bit of
> a hassle.

That's the final option to use I just wondered if they was a way that
I could do this another way.

> This smoother solution may be more difficult than you want to undertake,
> but we recently "hand" edited dumpfiles ("hand": mostly via a short sed script)
> to make a similar change.
>
> Most of the work can probably be done by changing all lines that look like:
>         Node...repo/dir1/...
> into
>         Node...dir1/...
> and lines that look like:
>         Node...repo/dir1
> into
>         Node...dir1
>
> However, there will be at least a few checkins that will need further work.
> For example, the checkin that added repo/dir1, and any later checkins that
> rename or delete this directory.
>
> Hope this is of some help.

Thanks, I'll try hand editing the dump file.

Cheers

Adam

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

Re: restructuring repositories with svndumpfilter

Posted by Chris Frost <ch...@frostnet.net>.
An easy solution is to do something akin to 'svn mv dir1/* .; svn rm dir1'.
However, moving between before and after this checkin will be a bit of
a hassle.


This smoother solution may be more difficult than you want to undertake, 
but we recently "hand" edited dumpfiles ("hand": mostly via a short sed script)
to make a similar change.

Most of the work can probably be done by changing all lines that look like:
	Node...repo/dir1/...
into
	Node...dir1/...
and lines that look like:
	Node...repo/dir1
into
	Node...dir1

However, there will be at least a few checkins that will need further work.
For example, the checkin that added repo/dir1, and any later checkins that
rename or delete this directory.


Hope this is of some help.


On Sat, Sep 08, 2007 at 12:40:09AM -0400, Adam Mercer wrote:
> Hi
> 
> I'm trying to restructure some of my repositories, esentially I want
> to split up a single repository into multiple ones. The current layout
> of my repo is
> 
> repo/
>   dir1
>   dir2
>   dir3
> 
> and I want separate repositories with each directory, i.e.
> 
> dir1/
> dir2/
> dir3/
> 
> the only problem is that the history of each directory is not
> independent, therefore I can't use svndumpfilter.
> 
> I have found svndumpfilter2 (from
> http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/svn-tools/svndumpfilter2?view=markup)
> which seems to be able to handle the case of separating directories
> that share history. If I run
> 
> $ svnadmin dump repo | svndumpfilter /path/to/svn/repo dir1 > dir1.svndump
> 
> that splits repo/dir1 into a separate repository, the only problem is
> that the structure of the new repository is
> 
> repo/
>  dir1
> 
> not just
> 
> dir1/
> 
> as I want. I know I can move the contents of dir1 into the root
> directory of the repository but does anyone know a way to get dir1 as
> a separate repository?
> 
> Cheers
> 
> Adam

-- 
Chris Frost  |  <http://www.frostnet.net/chris/>
-------------+----------------------------------
PGP: <http://www.frostnet.net/chris/pgpkey.txt>

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

RE: restructuring repositories with svndumpfilter

Posted by "Bicking, David (HHoldings, IT)" <Da...@thehartford.com>.
> -----Original Message-----
> From: Adam Mercer [mailto:ramercer@gmail.com] 
> 
> Hi
> 
> I'm trying to restructure some of my repositories, esentially 
> I want to split up a single repository into multiple ones. 
> The current layout of my repo is
> 
> repo/
>   dir1
>   dir2
>   dir3
> 
> and I want separate repositories with each directory, i.e.
> 
> dir1/
> dir2/
> dir3/
> 
> the only problem is that the history of each directory is not 
> independent, therefore I can't use svndumpfilter.
> 
> I have found svndumpfilter2 (from
> http://www.tartarus.org/~simon-anonsvn/viewcvs.cgi/svn-tools/s
> vndumpfilter2?view=markup)
> which seems to be able to handle the case of separating 
> directories that share history. If I run

Holy smokes!  This is the tool I've been seeking!  Thanks for telling me
about it.  I'll be looking on with interest for the answer to your
question about the root folder.  If I read the description correctly,
this would permit me to pull out one folder (project) with all its
history regardless of where it was originally located.

Thank you!

--
David


*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************

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