[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: <epg_at_google.com>
Date: Mon, 09 Jun 2008 14:45:13 -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)

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-09 23:45:52 CEST

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