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

Re: [PATCH]svnrdump to dump single specified revision

From: Stefan Sperling <stsp_at_elego.de>
Date: Mon, 6 Sep 2010 19:30:29 +0200

On Mon, Sep 06, 2010 at 09:53:24PM +0530, vijayaguru wrote:
> Attaching the patch,
>
> Thanks & Regards,
> Vijayaguru

From the output of svnrdump help dump:

  dump: usage: svnrdump dump URL [-r LOWER[:UPPER]]

  Dump revisions LOWER to UPPER of repository at remote URL to stdout in a 'dumpfile' portable format.
  If omitted, LOWER defaults to zero and UPPER to the latest latest revision.

So I don't think this patch is necessary. Instead, you can invoke svnrdump
like this: svnrdump dump -r42:42 URL

> Index: subversion/svnrdump/svnrdump.c
> ===================================================================
> --- subversion/svnrdump/svnrdump.c (revision 993027)
> +++ subversion/svnrdump/svnrdump.c (working copy)
> @@ -471,7 +471,10 @@
> NULL, 10);
> }
> else
> + {
> opt_baton->start_revision = (svn_revnum_t)strtoul(opt_arg, NULL, 10);
> + opt_baton->end_revision = opt_baton->start_revision;
> + }
> }
> break;
> case 'q':

One more remark you can keep in mind for future patches:
We usually use apr_atoi64() to parse numbers from a string. We should also
check for overflow. See the parse_offset() function in libsvn_diff/parse-diff.c
for an example.

Thanks,
Stefan
Received on 2010-09-06 19:31:28 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.