Login | Register
My pages Projects Community openCollabNet

Discussions > commits > svn commit: r2487 - branches/fsvs-1.2.x/fsvs: . src

fsvs
Discussion topic

Back to topic list

svn commit: r2487 - branches/fsvs-1.2.x/fsvs: . src

Author pmarek
Full name P.Marek
Date 2016-01-10 10:07:00 PST
Message Author: pmarek
Date: 2016-01-10 10:06:46-0800
New Revision: 2487

Modified:
   branches/fsvs-1.2.x/​fsvs/CHANGES
   branches/fsvs-1.2.x/​fsvs/src/url.c

Log:
URI canonicalization via SVN.

Modified: branches/fsvs-1.2.x/​fsvs/CHANGES
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/CHANGES?view=​diff&pathrev=248​7&r1=2486&r2​=2487
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/CHANGES (original)
+++ branches/fsvs-1.2.x/​fsvs/CHANGES 2016-01-10 10:06:46-0800
@@ -1,3 +1,6 @@
+Changes in 1.2.8
+- Fixed URI canonicalization (UTF8)
+
 Changes in 1.2.7
 - Updates for Clang
 - Fixed some compiler warnings

Modified: branches/fsvs-1.2.x/​fsvs/src/url.c
Url: http://fsvs.tigris.o​rg/source/browse/fsv​s/branches/fsvs-1.2.​x/fsvs/src/url.c?vie​w=diff&pathrev=2​487&r1=2486&​r2=2487
====================​====================​====================​==================
--- branches/fsvs-1.2.x/​fsvs/src/url.c (original)
+++ branches/fsvs-1.2.x/​fsvs/src/url.c 2016-01-10 10:06:46-0800
@@ -11,6 +11,7 @@
 #include <unistd.h>
 #include <ctype.h>
 #include <sys/select.h>
+#include <subversion-1/svn​_dirent_uri.h>
 
 
 #include "url.h"
@@ -1093,13 +1094,16 @@
     if (current_url->session) goto ex;
 
 
- /* We wouldn't need to allocate this memory if the URL was ok; but we
- * don't know that here, and it doesn't hurt that much. */
- STOPIF( hlp__strnalloc(curre​nt_url->urllen,
- &buffer, current_url->url), NULL);
- cp=buffer+current_ur​l->urllen;
+ /* We wouldn't need to allocate this memory if the URL was ok; but we
+ * don't know that here, and it doesn't hurt that much.
+ * Furthermore, only SVN knows what characters should be escaped - so
+ * lets get it done there. */
+ buffer = (char*)svn_uri_canon​icalize(current_url-​>url, global_pool);
+ BUG_ON(!buffer);
+ cp=buffer+strlen(buffer);
     BUG_ON(*cp);
 
+
     STOPIF_SVNERR_TEXT( svn_ra_open,
                 (& current_url->session, buffer,
                  &cb__cb_table, NULL, /* cbtable, cbbaton, */
@@ -1152,7 +1156,6 @@
         if (buffer + current_url->urllen == cp)
         {
             *missing_dirs=NULL;
- IF_FREE(buffer);
         }
         else
         {
@@ -1169,7 +1172,6 @@
             *missing_dirs=buffer;
         }
     }
- else IF_FREE(buffer);
 
 
     if (session)

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

svn commit: r2487 - branches/fsvs-1.2.x/fsvs: . src pmarek P.Marek 2016-01-10 10:07:00 PST
Messages per page: