subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nico Kadel-Garcia <nka...@gmail.com>
Subject Re: Breaking up a monolothic repository
Date Mon, 09 Sep 2013 01:57:21 GMT
Lock the existing repo: Do clean exports, and imports, to new repositories
with the new layout, with a README.md or other guideline to where the
legacy repository exists. You lose the infinitely preserved history this
way, but for most working software projects, you don't *need* that. And
it's a good opportunity to discard materials, such as bulky binaries or
security sensitive files with plain text passwords.


On Sun, Sep 8, 2013 at 9:13 PM, Trent W. Buck <trentbuck@gmail.com> wrote:

> I have inherited a single monolithic repo for all the company's
> projects.  I want to migrate to one repo per project. (One-way,
> one-time migration.)
>
> Following the red-bean book[0], I first tried svnadmin, which was
> really slow, and eventually crashed because some files were copied
> into projects/133_Redacted from a different subdir.
>
>     rm -rf delete-me
>     svnadmin create delete-me
>     svnadmin dump /srv/svn/Frobozz |
>     svndumpfilter --drop-empty-revs include projects/133_Redacted |
>     svnadmin load delete-me
>
>     [...]
>     svndumpfilter: Invalid copy source path
> '/EE/ProjectDocs/133_Redacted/REDACTED.pdf'
>     svnadmin: Can't write to stream: Broken pipe
>     <<< Started new transaction, based on original revision 4182
>     svnadmin: File not found: transaction '0-0', path
> 'projects/133_Redacted' * adding path : projects/133_Redacted ...
>
> Freenode's #svn IRC channel advised me to use svnsync instead.  That
> was really slow, eventually succeeded, but left a tonne of empty
> commit messages
>
>     rm -rf delete-me-2
>     svnadmin create delete-me-2
>     ln -s /bin/true delete-me-2/hooks/pre-revprop-change
>     svnsync init file://$PWD/delete-me-2
> file:///srv/svn/Frobozz/projects/133_Redacted
>     svnsync sync file://$PWD/delete-me-2
>     rm delete-me-2/hooks/pre-revprop-change
>
> So then I thought to chain the two approaches. This didn't work -- the
> empty revs were not removed. I guess svndumpfilter --drop-empty-revs
> is only smart enough to drop the revs that have just *become* empty?
>
>     rm -rf delete-me-3
>     svnadmin create delete-me-3
>     svnadmin dump delete-me-2 |
>     svndumpfilter --drop-empty-revs exclude /canthappen |
>     svnadmin load delete-me-3
>
> I also thought of converting to git fast-export format and back again,
> but AFAICT there is no way to import a fast-export into a svn repo.
>
> I'm stuck.  Since it's no fun to have tens of thousands of empty revs
> in each project repo, my current approach is to leave existing
> projects in the monolithic repo, and new projects get separate repos.
>
> What else can I do?
>
> [0] http://svnbook.red-bean.com/en/1.7/svn.reposadmin.maint.html
>
>

Mime
View raw message