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

Re: svn commit: r31611 - trunk/notes

From: <danielsh_at_tigris.org>
Date: Tue, 10 Jun 2008 09:40:47 +0300 (Jerusalem Daylight Time)

epg_at_google.com wrote on Mon, 9 Jun 2008 at 14:45 -0700:
> danielsh_at_tigris.org writes:
>
> > + NOTE: Don't not use `svn propedit`, because editors may append an EOL
> > + character to NEW_SOURCE_URL that will lead svnsync complaining
> > + "svnsync: Malformed URL for repository".
>
> Yuck; can we fix that? Maybe something like this? (untested)

I'd prefer to validate/normalise the property at prop{set,edit} time.

>
> Index: main.c
> ===================================================================
> --- main.c (revision 31366)
> +++ main.c (working copy)
> @@ -1240,6 +1240,12 @@
>
> SVN_ERR(svn_ra_rev_prop(to_session, 0, SVNSYNC_PROP_FROM_URL,
> &from_url, pool));
> + /* Eat trailing whitespace (so users can svn propedit this without
> + worrying about the editor adding a trailing newline. */
> + while ((from_url->len > 0) && apr_isspace(from_url->data[from_url->len - 1]))
> + from_url->len--;
> + from_url->data[from_url->len] = '\0';
> +
> SVN_ERR(svn_ra_rev_prop(to_session, 0, SVNSYNC_PROP_FROM_UUID,
> &from_uuid, pool));
> SVN_ERR(svn_ra_rev_prop(to_session, 0, SVNSYNC_PROP_LAST_MERGED_REV,
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-10 08:41:04 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.