You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Mathieu Malaterre <ma...@gmail.com> on 2010/10/13 13:24:23 UTC

svndump filter: How to pretend files were added to trunk

Hi there !

  I am trying to cleanup my SVN history. Back in the beginning of the
project I started using SVN without the standard layout (trunk,
branches, tags parent dir). Now using svndumpfilter, I would like to
pretend that initial history [r1-1097] did happen within the trunk
directory. For that I use svnadmin dump and then play with node-path
using sed:

cat initial.dump | sed -e 's,^Node-path: Applications,Node-path:
trunk/Applications,' -e 's,^Node-copyfrom-path:
Applications,Node-copyfrom-path: trunk/Applications,' > clean.dump

  Since trunk directory did not exist I tried doing:

svnadmin create clean
svn mkdir  -m"Initial project roots" file://`pwd`/clean/trunk
svnadmin load --quiet --ignore-uuid  clean < clean.dump

  However it fails with:

svnadmin: File not found: transaction '835-n7', path 'trunk/Applications'

Now if do:

svnadmin create clean
svn mkdir  -m"Initial project roots" file://`pwd`/clean/trunk
svn mkdir -m"Initial project roots" file://`pwd`/clean/trunk/Applications
svnadmin load --quiet --ignore-uuid  clean < clean.dump

It fails with:

svnadmin: File already exists: filesystem 'clean/db', transaction
'184-55', path 'trunk/Applications'

Am I missing something ? Is there a tool to re-root a bunch of
files/directories that were not initially created within a 'trunk' dir
?

Thanks !
-- 
Mathieu

Re: svndump filter: How to pretend files were added to trunk

Posted by David Weintraub <qa...@gmail.com>.
On Wed, Oct 13, 2010 at 9:24 AM, Mathieu Malaterre
<ma...@gmail.com> wrote:
>  I am trying to cleanup my SVN history. Back in the beginning of the
> project I started using SVN without the standard layout (trunk,
> branches, tags parent dir). Now using svndumpfilter, I would like to
> pretend that initial history [r1-1097] did happen within the trunk
> directory. For that I use svnadmin dump and then play with node-path
> using sed:

There is something in the redbean book that talks about redoing your
repository layout at http://bit.ly/cLQ3CZ. I'm not sure if you looked
at this, but it might give you an idea what you need to do. I've
personally never attempted this trick, but it is apparently possible.

-- 
David Weintraub
qazwart@gmail.com

RE: svndump filter: How to pretend files were added to trunk

Posted by Bob Archer <Bo...@amsi.com>.
> Hi there !
> 
>   I am trying to cleanup my SVN history. Back in the beginning of
> the
> project I started using SVN without the standard layout (trunk,
> branches, tags parent dir). Now using svndumpfilter, I would like
> to
> pretend that initial history [r1-1097] did happen within the trunk
> directory. For that I use svnadmin dump and then play with node-
> path
> using sed:
> 
> cat initial.dump | sed -e 's,^Node-path: Applications,Node-path:
> trunk/Applications,' -e 's,^Node-copyfrom-path:
> Applications,Node-copyfrom-path: trunk/Applications,' > clean.dump
> 
>   Since trunk directory did not exist I tried doing:
> 
> svnadmin create clean
> svn mkdir  -m"Initial project roots" file://`pwd`/clean/trunk
> svnadmin load --quiet --ignore-uuid  clean < clean.dump
> 
>   However it fails with:
> 
> svnadmin: File not found: transaction '835-n7', path
> 'trunk/Applications'
> 
> Now if do:
> 
> svnadmin create clean
> svn mkdir  -m"Initial project roots" file://`pwd`/clean/trunk
> svn mkdir -m"Initial project roots"
> file://`pwd`/clean/trunk/Applications
> svnadmin load --quiet --ignore-uuid  clean < clean.dump
> 
> It fails with:
> 
> svnadmin: File already exists: filesystem 'clean/db', transaction
> '184-55', path 'trunk/Applications'
> 
> Am I missing something ? Is there a tool to re-root a bunch of
> files/directories that were not initially created within a 'trunk'
> dir
> ?
> 

If you are putting this into the same repository why not just export the stuff.... then import it into the path you would like it to reside? This will begin the history for that new path.

BOb