[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH v2] Add svnrdump

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Fri, 23 Jul 2010 21:56:41 +0300

Ramkumar Ramachandra wrote on Fri, Jul 23, 2010 at 23:56:57 +0530:
> Hi Daniel,
>
> Daniel Shahaf writes:
> > Or, you could have svnrdump report the highest revision it dumped, and the
> > admin can remember that and invoke svnrdump -r N+1:HEAD next time. (Much
> > cheaper than parsing the entire dumpfile --- which you would have to do in
> > order to figure how many revisions it contains.)
> >
> > (One can parse that already out of the "* Dumped revision %ld" notifications;
> > if this use case is important, we may want to have a switch to suppress all but
> > the last notification...)
>
> Ah, excellent suggestion! :)
>
> Only, I wonder what'll happen if the connection breaks after the last
> revision has been partially dumped-

Good question.

I'd probably say "last revision successfully dumped was rN" and then exit with
a non-zero code, leaving it to the admin to clean up the mess (i.e., to truncate
the dumpfile after the end of rN's data).

Unfortunately, since you dump to stdout, you can't do that seek+truncate yourself :-(

> can we just look for
> "^Revision-number: \d+$" from the bottom of the file, clean it up and
> then resume?
>

What if a file contains that line as part of its content?

(This could happen if somebody versioned a dumpfile. We do.)

> -- Ram
Received on 2010-07-23 20:58:18 CEST

This is an archived mail posted to the Subversion Dev mailing list.