On Thu, Aug 31, 2023 at 2:21 PM Magnus Lyrberg
<magnus.lyrb...@elk-studios.com> wrote:
>
> Hello.
>
> I'm not subscribed so please CC me in any response.
>
> We have, most unfortunately and for historical reasons,
> a very hard dependency on the revision number in subversion.
>
> Our current repository has become large and unwieldy, and we
> want to move to a fresh repository. The history is not very important,
> we are ok to start from scratch, but loosing the revision number
> would be incredibly costly.
>
> Is there some other way besides making a bunch of dummy commits
> to reach our current revision number in a new repository?

Maybe you can give svndumpfilter [1] a try to filter out the "cruft"
(after creating a dump file from the original repository). It has
options like:

    --drop-empty-revs
    If the current filtering invocation causes any revision to be
empty (i.e., the revision causes no change to the repository), removes
these revisions from the final dump file.

    --renumber-revs
    Renumbers revisions that remain after filtering.

which seems to indicate that by default (not using these options) it
will keep the original revision numbering (even if you filter out
entire revisions so they become empty).

You'll have to create a dump file first, by using 'svnadmin dump' if
you have file access to the repo, or 'svnrdump dump' if you only have
remote access. Then svndumpfilter it, and 'svnadmin load' it into a
new repository. Maybe first try it with a small test sample to see if
it works as expected.

[1] https://svnbook.red-bean.com/nightly/en/svn.ref.svndumpfilter.html
-- 
Johan

Reply via email to