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

Re: svn commit: r1125983 - /subversion/trunk/subversion/libsvn_repos/commit.c

From: Daniel Shahaf <d.s_at_daniel.shahaf.name>
Date: Sun, 22 May 2011 18:47:28 +0300

r1125998.

Stefan Sperling wrote on Sun, May 22, 2011 at 17:29:08 +0200:
> On Sun, May 22, 2011 at 06:26:10PM +0300, Daniel Shahaf wrote:
> > stsp_at_apache.org wrote on Sun, May 22, 2011 at 15:11:53 -0000:
> > > +/* Verify the mergeinfo property value VALUE and return an error if it
> > > + * is invalid. Use SCRATCH_POOL for temporary allocations. */
> > > +static svn_error_t *
> > > +verify_mergeinfo(const svn_string_t *value, apr_pool_t *scratch_pool)
> > > +{
> > > + svn_error_t *err;
> > > + svn_mergeinfo_t mergeinfo;
> > > +
> > > + /* Mergeinfo is UTF-8 encoded so the number of bytes returned by strlen()
> > > + * should match VALUE->LEN. Prevents trailing garbage in the property. */
> > > + if (strlen(value->data) != value->len)
> > > + return svn_error_quick_wrap(err, _("Commit rejected because mergeinfo "
> > > + "contains unexpected string terminator"));
> > > +
> > > + err = svn_mergeinfo_parse(&mergeinfo, value->data, scratch_pool);
> > > + if (err)
> > > + return svn_error_quick_wrap(err, _("Commit rejected because of mergeinfo "
> > > + "syntax error"));
> >
> > Can we say here "a mergeinfo syntax error on path %s"?
>
> Good idea. I think we'd simply have to pass fb->path to verify_mergeinfo().
>
> Wanna take a shot at it? :)
Received on 2011-05-22 17:48:13 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.