Re: Adjust revision in new repository

Magnus Lyrberg <[email protected]>
Newsgroups gmane.comp.version-control.subversion.user
Message-ID <CANGX5yDokwezkECRd4QmwPnnV03kxWOBtb4uOZwvibCkZ6WUbQ@mail.gmail.com>
On Fri, Sep 1, 2023 at 2:00 PM Johan Corveleyn <[email protected]> wrote:

> On Fri, Sep 1, 2023 at 11:05 AM Magnus Lyrberg
> <[email protected]> wrote:
> > On Thu, Aug 31, 2023 at 4:51 PM Johan Corveleyn <[email protected]>
> wrote:
> > > On Thu, Aug 31, 2023 at 2:21 PM Magnus Lyrberg
> > > > 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).

>
> > 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").
>

You are completely correct that the partial_dump.dump contained only
revision 7 and 8, and that a filtered dump like you suggest will result in
the correct revision number in the new repository. This does however
also result in a number of empty revisions (dummy commits as I called
them in the initial mail), which is what we want to avoid.

What we would like to achieve is to have the current HEAD, without the
history, in a new repository while still maintaining the revision number.
Preferably without (quite a lot of) empty commits.


Best regards
Magnus Lyrberg
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.