On Fri, Sep 1, 2023 at 11:05 AM Magnus Lyrberg <magnus.lyrb...@elk-studios.com> wrote: > 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) >>>
But what is partial_dump.dump? Can you show us the exact commands you used to create it? Did you create this by dumping only revisions 7 and 8 from the original repository, as in 'svnadmin dump /path/to/orig_repos -r7:8 > partial_dump.dump'? In that case, it is expected to behave like you described. Or did you create it by dumping the entire repository, and then svndumpfilter-ing out the unneeded stuff, as in 'svnadmin dump /path/to/orig_repos | svndumpfilter exclude /path/to/unneededstuff > partial_dump.dump'? It is the last technique that I was suggesting, and I would expect that to retain all the existing revision numbers (some revisions might become empty revs because of the filtering, but they should still "count"). -- Johan