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: > > s...@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? :)