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

log-report without path breaks compatibility

From: Martin von Gagern <Martin.vGagern_at_gmx.net>
Date: Tue, 03 Jun 2008 13:15:09 +0200

Hi!

Subversion documentations for svn_ra_get_log2 writes:

If paths is non-NULL and has one or more elements, then only show
revisions in which at least one of paths was changed (i.e., if file,
text or props changed; if dir, props changed or an entry was added or
deleted). Each path is an const char *, relative to the session's common
parent.

For me this would suggest that a value of NULL or an empty list of paths
would request all revisions. However, at least for WebDAV with some
servers this is not the case. I encountered this when investigating
https://bugs.launchpad.net/bzr-svn/+bug/235776 and looking at the
network traffic. The mod_svn for http://svn.unix-ag.uni-kl.de/vpnc
returns an empty log-report when the request contains no path.

SVN requests without path seem to be due to r13875. The attached patch
modifies the behaviour of svn_ra_neon__get_log to match the
specification by requesting <S:path></S:path> for paths==NULL or
paths->nelts==0. I haven't looked at other access protocols, but I guess
  serf and svn could be affected as well.

Greetings,
  Martin von Gagern

diff -pur --exclude='*~' subversion-1.5.0-rc5.orig/subversion/libsvn_ra_neon/log.c subversion-1.5.0-rc5/subversion/libsvn_ra_neon/log.c
--- subversion-1.5.0-rc5.orig/subversion/libsvn_ra_neon/log.c 2008-06-03 12:45:54.000000000 +0200
+++ subversion-1.5.0-rc5/subversion/libsvn_ra_neon/log.c 2008-06-03 13:08:54.000000000 +0200
@@ -446,7 +446,7 @@ svn_error_t * svn_ra_neon__get_log(svn_r
     }
 
 
- if (paths)
+ if (paths && paths->nelts)
     {
       for (i = 0; i < paths->nelts; i++)
         {
@@ -459,6 +459,11 @@ svn_error_t * svn_ra_neon__get_log(svn_r
           svn_stringbuf_appendcstr(request_body, "</S:path>");
         }
     }
+ else
+ {
+ /* for compatibility, as some servers don't like requests without path */
+ svn_stringbuf_appendcstr(request_body, "<S:path></S:path>");
+ }
 
   svn_stringbuf_appendcstr(request_body, log_request_tail);
 

---------------------------------------------------------------------
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-03 13:15:28 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.