You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2013/03/28 15:50:28 UTC

svn commit: r1462134 - /subversion/trunk/subversion/libsvn_client/log.c

Author: cmpilato
Date: Thu Mar 28 14:50:28 2013
New Revision: 1462134

URL: http://svn.apache.org/r1462134
Log:
Fix an assertion caused by running 'svn log <SOME_URL>@PREV'.

* subversion/libsvn_client/log.c
  (svn_client_log5): Use a flag to remember which flavor of paths the
    log targets are (URL or WC), consulting it later so we can call the
    appropriate svn_*_condense_targets() API.

Reported by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_client/log.c

Modified: subversion/trunk/subversion/libsvn_client/log.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/log.c?rev=1462134&r1=1462133&r2=1462134&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/log.c (original)
+++ subversion/trunk/subversion/libsvn_client/log.c Thu Mar 28 14:50:28 2013
@@ -288,6 +288,7 @@ svn_client_log5(const apr_array_header_t
   apr_pool_t *iterpool;
   int i;
   svn_opt_revision_t peg_rev;
+  svn_boolean_t url_targets = FALSE;
 
   if (revision_ranges->nelts == 0)
     {
@@ -412,6 +413,9 @@ svn_client_log5(const apr_array_header_t
              interested in. */
           APR_ARRAY_PUSH(condensed_targets, const char *) = "";
         }
+
+      /* Remember that our targets are URLs. */
+      url_targets = TRUE;
     }
   else
     {
@@ -479,8 +483,14 @@ svn_client_log5(const apr_array_header_t
      * we use our initial target path to figure out where to root the RA
      * session, otherwise we use our URL. */
     if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_rev.kind))
-      SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets,
-                                          TRUE, pool, pool));
+      {
+        if (url_targets)
+          SVN_ERR(svn_uri_condense_targets(&ra_target, NULL, targets,
+                                           TRUE, pool, pool));
+        else
+          SVN_ERR(svn_dirent_condense_targets(&ra_target, NULL, targets,
+                                              TRUE, pool, pool));
+      }
     else
       ra_target = url_or_path;