On Thu, Aug 31, 2023 at 4:51 PM Johan Corveleyn <jcor...@gmail.com> wrote: > 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. > > > > 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.
Unfortunately 'svnadmin load' ignores the revision information in the dump file. If the new repository is empty it will start with revision 1 regardless of what the dump file says. I made a quick test to verify this: svnadmin load /var/svn/repo2 < partial_dump.dump <<< Started new transaction, based on original revision 7 * adding path : test.txt ... done. ------- Committed new rev 1 (loaded from original rev 7) >>> <<< Started new transaction, based on original revision 8 * editing path : test.txt ... done. ------- Committed new rev 2 (loaded from original rev 8) >>> I want to achieve the new repository ending up at revision 8 (or even slightly above 8), where my old repository was. But as not all revisions are in the dump file it ended up on revision 2. Best regards Magnus Lyrberg