subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1586557 - in /subversion/branches/1.8.x: ./ STATUS subversion/libsvn_client/prop_commands.c subversion/tests/cmdline/prop_tests.py
Date Fri, 11 Apr 2014 04:01:35 GMT
Author: svn-role
Date: Fri Apr 11 04:01:34 2014
New Revision: 1586557

URL: http://svn.apache.org/r1586557
Log:
Merge r1586255 from trunk:

 * r1586255
   Fix propget/proplist error on invalid revisions
   Justification:
     Replaces easy to trigger assertions with proper errors.
   Votes:
     +1: rhuijben, julianfoad, philip

Modified:
    subversion/branches/1.8.x/   (props changed)
    subversion/branches/1.8.x/STATUS
    subversion/branches/1.8.x/subversion/libsvn_client/prop_commands.c
    subversion/branches/1.8.x/subversion/tests/cmdline/prop_tests.py

Propchange: subversion/branches/1.8.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1586255

Modified: subversion/branches/1.8.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/STATUS?rev=1586557&r1=1586556&r2=1586557&view=diff
==============================================================================
--- subversion/branches/1.8.x/STATUS (original)
+++ subversion/branches/1.8.x/STATUS Fri Apr 11 04:01:34 2014
@@ -386,13 +386,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1586255
-   Fix propget/proplist error on invalid revisions
-   Justification:
-     Replaces easy to trigger assertions with proper errors.
-   Votes:
-     +1: rhuijben, julianfoad, philip
-
  * r1481782
    Fix problem in test suite by allocating buffer of the right size
    Justification:

Modified: subversion/branches/1.8.x/subversion/libsvn_client/prop_commands.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/libsvn_client/prop_commands.c?rev=1586557&r1=1586556&r2=1586557&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/libsvn_client/prop_commands.c (original)
+++ subversion/branches/1.8.x/subversion/libsvn_client/prop_commands.c Fri Apr 11 04:01:34
2014
@@ -890,8 +890,14 @@ svn_client_propget5(apr_hash_t **props,
           const char *copy_root_abspath;
           svn_boolean_t is_copy;
 
-          SVN_ERR(svn_dirent_get_absolute(&local_abspath, target,
-                                          scratch_pool));
+          /* Avoid assertion on the next line when somebody accidentally asks for
+             a working copy revision on a URL */
+          if (svn_path_is_url(target))
+            return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
+                                    NULL, NULL);
+
+          SVN_ERR_ASSERT(svn_dirent_is_absolute(target));
+          local_abspath = target;
 
           if (SVN_CLIENT__REVKIND_NEEDS_WC(peg_revision->kind))
             {
@@ -1293,6 +1299,12 @@ get_remote_props(const char *path_or_url
       const char *copy_root_abspath;
       svn_boolean_t is_copy;
 
+      /* Avoid assertion on the next line when somebody accidentally asks for
+         a working copy revision on a URL */
+      if (svn_path_is_url(path_or_url))
+        return svn_error_create(SVN_ERR_CLIENT_VERSIONED_PATH_REQUIRED,
+                                NULL, NULL);
+
       SVN_ERR(svn_dirent_get_absolute(&local_abspath, path_or_url,
                                       scratch_pool));
 

Modified: subversion/branches/1.8.x/subversion/tests/cmdline/prop_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x/subversion/tests/cmdline/prop_tests.py?rev=1586557&r1=1586556&r2=1586557&view=diff
==============================================================================
--- subversion/branches/1.8.x/subversion/tests/cmdline/prop_tests.py (original)
+++ subversion/branches/1.8.x/subversion/tests/cmdline/prop_tests.py Fri Apr 11 04:01:34 2014
@@ -2654,6 +2654,20 @@ def iprops_list_abspath(sbox):
                                      '--show-inherited-props', '-v',
                                      os.path.abspath(sbox.ospath('')))
 
+def wc_propop_on_url(sbox):
+  "perform wc specific operations on url"
+
+  sbox.build(create_wc = False)
+
+  svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
+                                     'pl', '-r', 'PREV',
+                                     sbox.repo_url)
+
+  svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
+                                     'pg', 'my:Q', '-r', 'PREV',
+                                     sbox.repo_url)
+
+
 ########################################################################
 # Run the tests
 
@@ -2700,6 +2714,7 @@ test_list = [ None,
               almost_known_prop_names,
               peg_rev_base_working,
               iprops_list_abspath,
+              wc_propop_on_url,
              ]
 
 if __name__ == '__main__':



Mime
View raw message