subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marius Gedminas <>
Subject Re: Discrepancies in svn mirror created with svnsync
Date Wed, 13 Feb 2013 19:19:13 GMT
On Tue, Feb 12, 2013 at 06:54:14PM +0100, Stefan Sperling wrote:
> On Tue, Feb 12, 2013 at 05:18:01PM +0200, Marius Gedminas wrote:
> > Anyway, this takes care of prevention.  What about recovery?  Can I fix
> > the three missing revisions manually somehow?
> If you can obtain the original revision files from the master
> repository, you can try dropping them into the slave repository as-is.
> That should work, provided the revs are valid on the master.

I don't have shell (or file) access to the original server.

> > Or at least truncate my
> > mirror's history to that point so that I could run svnsync to get just
> > the last month and a half, instead of re-creating the mirror from
> > scratch?
> It's possible to reset the repository to some revision rN, yes.
> The official way of doing this is to dump the repository from r0
> to rN (using svnadmin dump) and loading this dump file into a freshly
> created repository (svnadmin load).
> Since you're creating an svnsync mirror you should probably run
> 'svnsync init' before loading the dump file, and after loading adjust
> the svn:sync-last-merged-rev revision property on r0 to say 'rN'.

Thanks, this worked (after a false start where I assumed svnadmin dump
-rN:M would be a half-open interval like it is for svn log -rN:M; in the
end I wasted an hour and had to repeat the dump & load):

  $ mv zope-mirror zope-mirror.BROKEN
  $ svnadmin create zope-mirror
  $ svnadmin setuuid zope-mirror 62d5b8a3-27da-0310-9561-8e5933582275
  $ cp zope-mirror.BROKEN/hooks/pre-revprop-change zope-mirror/hooks/
  $ svnsync init file:///$PWD/zope-mirror svn://
  $ svnadmin dump zope-mirror.BROKEN -r0:129020 > DUMP
  $ svnadmin load zope-mirror --bypass-prop-validation -q < DUMP
  $ svnadmin setrevprop zope-mirror -r0 svn:sync-last-merged-rev <(svnlook youngest zope-mirror)
  $ svnlook propget --revprop zope-mirror -r0 svn:sync-last-merged-rev

But then I ran svnsync again and it gave me broken revisions again:

  $ svnsync sync file:///$PWD/zope-mirror
  $ svnlook author -r 129030 zope-mirror/ | wc -c

And then I noticed that r129027 also became broken in this new mirror,
but was fine in the old one:

  $ svnlook author -r 129027 zope-mirror/ | wc -c
  $ svnlook author -r 129027 zope-mirror.BROKEN/ | wc -c

I was doing this with a copy of the broken mirror on my laptop, which
has svnsync version 1.7.5 (r1336830).

I guess this answers your question from upthread:

> It would be interesting to know if this problem also appears with 
> svnsync from 1.7.

Sadly, yes.

Marius Gedminas
No proper program contains an indication which as an operator-applied
occurrence identifies an operator-defining occurrence which as an
indication-applied occurrence identifies an indication-defining occurrence
different from the one identified by the given indication as an
indication-applied occurrence.
                -- ALGOL 68 Report

View raw message