You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2015/06/19 21:53:21 UTC

svn commit: r1686494 [2/2] - in /subversion/branches/move-tracking-2: ./ subversion/ subversion/libsvn_client/ subversion/libsvn_delta/ subversion/libsvn_fs_fs/ subversion/libsvn_repos/ subversion/libsvn_subr/ subversion/mod_dav_svn/ subversion/mod_dav...

Modified: subversion/branches/move-tracking-2/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/mod_dav_svn/version.c?rev=1686494&r1=1686493&r2=1686494&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/move-tracking-2/subversion/mod_dav_svn/version.c Fri Jun 19 19:53:20 2015
@@ -88,7 +88,7 @@ set_auto_revprops(dav_resource *resource
 
   if (! (resource->type == DAV_RESOURCE_TYPE_WORKING
          && resource->info->auto_checked_out))
-    return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+    return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0, 0,
                               "Set_auto_revprops called on invalid resource.");
 
   if ((serr = dav_svn__attach_auto_revprops(resource->info->root.txn,
@@ -396,14 +396,14 @@ vsn_control(dav_resource *resource, cons
   /* All mod_dav_svn resources are versioned objects;  so it doesn't
      make sense to call vsn_control on a resource that exists . */
   if (resource->exists)
-    return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0,
+    return dav_svn__new_error(resource->pool, HTTP_BAD_REQUEST, 0, 0,
                               "vsn_control called on already-versioned "
                               "resource.");
 
   /* Only allow a NULL target, which means an create an 'empty' VCR. */
   if (target != NULL)
     return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
-                                  SVN_ERR_UNSUPPORTED_FEATURE,
+                                  SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                   "vsn_control called with non-null target");
 
   /* This is kind of silly.  The docstring for this callback says it's
@@ -451,13 +451,13 @@ dav_svn__checkout(dav_resource *resource
 
       if (resource->type != DAV_RESOURCE_TYPE_REGULAR)
         return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
-                                      SVN_ERR_UNSUPPORTED_FEATURE,
+                                      SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                       "auto-checkout attempted on non-regular "
                                       "version-controlled resource");
 
       if (resource->baselined)
         return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
-                                      SVN_ERR_UNSUPPORTED_FEATURE,
+                                      SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                       "auto-checkout attempted on baseline "
                                       "collection, which is not supported");
 
@@ -503,7 +503,7 @@ dav_svn__checkout(dav_resource *resource
                                              shared_activity);
           if (! shared_txn_name)
             return dav_svn__new_error(resource->pool,
-                                      HTTP_INTERNAL_SERVER_ERROR, 0,
+                                      HTTP_INTERNAL_SERVER_ERROR, 0, 0,
                                       "Cannot look up a txn_name by activity");
         }
 
@@ -542,21 +542,21 @@ dav_svn__checkout(dav_resource *resource
   if (resource->type != DAV_RESOURCE_TYPE_VERSION)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_METHOD_NOT_ALLOWED,
-                                    SVN_ERR_UNSUPPORTED_FEATURE,
+                                    SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                     "CHECKOUT can only be performed on a "
                                     "version resource");
     }
   if (create_activity)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
-                                    SVN_ERR_UNSUPPORTED_FEATURE,
+                                    SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                     "CHECKOUT cannot create an activity at "
                                     "this time. Use MKACTIVITY first");
     }
   if (is_unreserved)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
-                                    SVN_ERR_UNSUPPORTED_FEATURE,
+                                    SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                     "Unreserved checkouts are not yet "
                                     "available. A version history may not be "
                                     "checked out more than once, into a "
@@ -565,7 +565,7 @@ dav_svn__checkout(dav_resource *resource
   if (activities == NULL)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
-                                    SVN_ERR_INCOMPLETE_DATA,
+                                    SVN_ERR_INCOMPLETE_DATA, 0,
                                     "An activity must be provided for "
                                     "checkout");
     }
@@ -573,7 +573,7 @@ dav_svn__checkout(dav_resource *resource
   if (activities->nelts != 1)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
-                                    SVN_ERR_INCORRECT_PARAMS,
+                                    SVN_ERR_INCORRECT_PARAMS, 0,
                                     "Only one activity may be specified within "
                                     "the CHECKOUT");
     }
@@ -592,7 +592,7 @@ dav_svn__checkout(dav_resource *resource
   if (parse.activity_id == NULL)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
-                                    SVN_ERR_INCORRECT_PARAMS,
+                                    SVN_ERR_INCORRECT_PARAMS, 0,
                                     "The provided href is not an activity URI");
     }
 
@@ -600,7 +600,7 @@ dav_svn__checkout(dav_resource *resource
                                    parse.activity_id)) == NULL)
     {
       return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
-                                    SVN_ERR_APMOD_ACTIVITY_NOT_FOUND,
+                                    SVN_ERR_APMOD_ACTIVITY_NOT_FOUND, 0,
                                     "The specified activity does not exist");
     }
 
@@ -630,7 +630,7 @@ dav_svn__checkout(dav_resource *resource
       if (resource->info->root.rev != youngest)
         {
           return dav_svn__new_error_svn(resource->pool, HTTP_CONFLICT,
-                                        SVN_ERR_APMOD_BAD_BASELINE,
+                                        SVN_ERR_APMOD_BAD_BASELINE, 0,
                                         "The specified baseline is not the "
                                         "latest baseline, so it may not be "
                                         "checked out");
@@ -728,7 +728,7 @@ dav_svn__checkout(dav_resource *resource
               /* The item being modified is older than the one in the
                  transaction.  The client is out of date.  */
               return dav_svn__new_error_svn
-                (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
+                (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT, 0,
                  "resource out of date; try updating");
             }
           else if (resource->info->root.rev > txn_created_rev)
@@ -745,7 +745,7 @@ dav_svn__checkout(dav_resource *resource
                                                resource->pool)))
                 {
                   err = dav_svn__new_error_svn
-                    (resource->pool, HTTP_CONFLICT, serr->apr_err,
+                    (resource->pool, HTTP_CONFLICT, serr->apr_err, 0,
                      "Unable to fetch the node revision id of the version "
                      "resource within the revision");
                   svn_error_clear(serr);
@@ -754,7 +754,7 @@ dav_svn__checkout(dav_resource *resource
               if (node_relation != svn_fs_node_unchanged)
                 {
                   return dav_svn__new_error_svn
-                    (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT,
+                    (resource->pool, HTTP_CONFLICT, SVN_ERR_FS_CONFLICT, 0,
                      "version resource newer than txn (restart the commit)");
                 }
             }
@@ -773,7 +773,7 @@ uncheckout(dav_resource *resource)
 {
   if (resource->type != DAV_RESOURCE_TYPE_WORKING)
     return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
-                                  SVN_ERR_UNSUPPORTED_FEATURE,
+                                  SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                   "UNCHECKOUT called on non-working resource");
 
   /* Try to abort the txn if it exists;  but don't try too hard.  :-)  */
@@ -914,7 +914,7 @@ dav_svn__checkin(dav_resource *resource,
 
   if (resource->type != DAV_RESOURCE_TYPE_WORKING)
     return dav_svn__new_error_svn(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
-                                  SVN_ERR_UNSUPPORTED_FEATURE,
+                                  SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                   "CHECKIN called on non-working resource");
 
   /* If the global autoversioning activity still exists, that means
@@ -940,19 +940,22 @@ dav_svn__checkin(dav_resource *resource,
       shared_txn_name = dav_svn__get_txn(resource->info->repos,
                                          shared_activity);
       if (! shared_txn_name)
-        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+                                  0, 0,
                                   "Cannot look up a txn_name by activity");
 
       /* Sanity checks */
       if (resource->info->root.txn_name
           && (strcmp(shared_txn_name, resource->info->root.txn_name) != 0))
-        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+                                  0, 0,
                                   "Internal txn_name doesn't match "
                                   "autoversioning transaction.");
 
       if (! resource->info->root.txn)
         /* should already be open by checkout */
-        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR, 0,
+        return dav_svn__new_error(resource->pool, HTTP_INTERNAL_SERVER_ERROR,
+                                  0, 0,
                                   "Autoversioning txn isn't open "
                                   "when it should be.");
 
@@ -1018,7 +1021,7 @@ dav_svn__checkin(dav_resource *resource,
             {
               return dav_svn__new_error(resource->pool,
                                         HTTP_INTERNAL_SERVER_ERROR,
-                                        0,
+                                        0, 0,
                                         "Commit failed but there was no error "
                                         "provided.");
             }
@@ -1151,7 +1154,7 @@ deliver_report(request_rec *r,
 
   /* ### what is a good error for an unknown report? */
   return dav_svn__new_error_svn(resource->pool, HTTP_NOT_IMPLEMENTED,
-                                SVN_ERR_UNSUPPORTED_FEATURE,
+                                SVN_ERR_UNSUPPORTED_FEATURE, 0,
                                 "The requested report is unknown");
 }
 
@@ -1180,7 +1183,7 @@ make_activity(dav_resource *resource)
      case an older mod_dav doesn't do the check for us. */
   if (! can_be_activity(resource))
     return dav_svn__new_error_svn(resource->pool, HTTP_FORBIDDEN,
-                                  SVN_ERR_APMOD_MALFORMED_URI,
+                                  SVN_ERR_APMOD_MALFORMED_URI, 0,
                                   "Activities cannot be created at that "
                                   "location; query the "
                                   "DAV:activity-collection-set property");
@@ -1428,7 +1431,7 @@ merge(dav_resource *target,
              && source->info->restype == DAV_SVN_RESTYPE_TXN_COLLECTION)))
     {
       return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
-                                    SVN_ERR_INCORRECT_PARAMS,
+                                    SVN_ERR_INCORRECT_PARAMS, 0,
                                     "MERGE can only be performed using an "
                                     "activity or transaction resource as the "
                                     "source");
@@ -1436,7 +1439,7 @@ merge(dav_resource *target,
   if (! source->exists)
     {
       return dav_svn__new_error_svn(pool, HTTP_METHOD_NOT_ALLOWED,
-                                    SVN_ERR_INCORRECT_PARAMS,
+                                    SVN_ERR_INCORRECT_PARAMS, 0,
                                     "MERGE activity or transaction resource "
                                     "does not exist");
     }
@@ -1533,7 +1536,7 @@ merge(dav_resource *target,
         {
           return dav_svn__new_error(pool,
                                     HTTP_INTERNAL_SERVER_ERROR,
-                                    0,
+                                    0, 0,
                                     "Commit failed but there was no error "
                                     "provided.");
         }

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1686494&r1=1686493&r2=1686494&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/merge_tree_conflict_tests.py Fri Jun 19 19:53:20 2015
@@ -2124,18 +2124,16 @@ def merge_obstruction_recording(sbox):
   })
   expected_mergeinfo_output = wc.State(wc_dir, {
     ''             : Item(status=' U'),
-    'dir'          : Item(status=' U'), # Because dir already exists
   })
   expected_elision_output = wc.State(wc_dir, {
   })
   expected_disk = wc.State('', {
     'dir/file.txt' : Item(contents="The file on branch\n"),
-    'dir'          : Item(props={'svn:mergeinfo':''}),
     '.'            : Item(props={'svn:mergeinfo':'/trunk:2-4'}),
   })
   expected_status = wc.State(wc_dir, {
     ''             : Item(status=' M', wc_rev='4'),
-    'dir'          : Item(status=' M', treeconflict='C', wc_rev='4'),
+    'dir'          : Item(status='  ', treeconflict='C', wc_rev='4'),
     'dir/file.txt' : Item(status='  ', wc_rev='4'),
   })
   expected_skip = wc.State('', {
@@ -2172,7 +2170,7 @@ def merge_obstruction_recording(sbox):
   expected_output = [
     '--- Recording mergeinfo for merge of r4 into \'%s\':\n' % \
             sbox.ospath('dir'),
-    ' G   %s\n' % sbox.ospath('dir'),
+    ' U   %s\n' % sbox.ospath('dir'),
   ]
   # ### Why are r1-r3 not recorded?
   # ### Guess: Because dir's history only exists since r4.

Modified: subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py?rev=1686494&r1=1686493&r2=1686494&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py (original)
+++ subversion/branches/move-tracking-2/subversion/tests/cmdline/svnadmin_tests.py Fri Jun 19 19:53:20 2015
@@ -3003,6 +3003,22 @@ def load_no_svndate_r0(sbox):
                                          'proplist', '--revprop', '-r0',
                                          sbox.repo_dir)
 
+# This is only supported for FSFS and BDB
+# The port to FSX is still pending.
+@Skip(svntest.main.is_fs_type_fsx)
+def hotcopy_read_only(sbox):
+  "'svnadmin hotcopy' a read-only source repository"
+  sbox.build()
+  svntest.main.chmod_tree(sbox.repo_dir, 0444, 0444)
+
+  backup_dir, backup_url = sbox.add_repo_path('backup')
+  exit_code, output, errput = svntest.main.run_svnadmin("hotcopy",
+                                                        sbox.repo_dir,
+                                                        backup_dir)
+  if errput:
+    logger.warn("Error: hotcopy failed")
+    raise svntest.Failure
+
 ########################################################################
 # Run the tests
 
@@ -3059,6 +3075,7 @@ test_list = [ None,
               upgrade,
               load_txdelta,
               load_no_svndate_r0,
+              hotcopy_read_only,
              ]
 
 if __name__ == '__main__':

Modified: subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c?rev=1686494&r1=1686493&r2=1686494&view=diff
==============================================================================
--- subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c (original)
+++ subversion/branches/move-tracking-2/subversion/tests/libsvn_client/mtcc-test.c Fri Jun 19 19:53:20 2015
@@ -543,8 +543,7 @@ handle_rev(void *baton,
   SVN_TEST_ASSERT(apr_hash_count(rev_props) >= 3);
   SVN_TEST_STRING_ASSERT(path, (rev < 5) ? "/iota" : "/mu");
 
-  if (!hrb->first
-      && (rev == (hrb->up ? 5 : 4) || rev == (hrb->up ? 8 : 6)))
+  if (!hrb->first && (rev == (hrb->up ? 8 : 6)))
     SVN_TEST_ASSERT(delta_handler == NULL);
   else
     SVN_TEST_ASSERT(delta_handler != NULL);