You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/11/30 11:24:23 UTC

svn commit: r1717223 [36/50] - in /subversion/branches/ra-git: ./ build/ build/ac-macros/ build/generator/ build/generator/templates/ contrib/hook-scripts/ notes/ notes/api-errata/1.9/ notes/move-tracking/ subversion/ subversion/bindings/ctypes-python/...

Modified: subversion/branches/ra-git/subversion/mod_dav_svn/version.c
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/mod_dav_svn/version.c?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/mod_dav_svn/version.c (original)
+++ subversion/branches/ra-git/subversion/mod_dav_svn/version.c Mon Nov 30 10:24:16 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,
@@ -152,6 +152,7 @@ get_vsn_options(apr_pool_t *p, apr_text_
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INHERITED_PROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_INLINE_PROPS);
   apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_REVERSE_FILE_REVS);
+  apr_text_append(p, phdr, SVN_DAV_NS_DAV_SVN_SVNDIFF1);
   /* Mergeinfo is a special case: here we merely say that the server
    * knows how to handle mergeinfo -- whether the repository does too
    * is a separate matter.
@@ -303,25 +304,25 @@ get_option(const dav_resource *resource,
          addressable resources. */
       apr_table_set(r->headers_out, SVN_DAV_ROOT_URI_HEADER, repos_root_uri);
       apr_table_set(r->headers_out, SVN_DAV_ME_RESOURCE_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_me_resource_uri(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_REV_ROOT_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_rev_root_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_REV_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_rev_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_TXN_ROOT_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_txn_root_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_TXN_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_txn_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_VTXN_ROOT_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_vtxn_root_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_VTXN_STUB_HEADER,
-                    apr_pstrcat(resource->pool, repos_root_uri, "/",
+                    apr_pstrcat(r->pool, repos_root_uri, "/",
                                 dav_svn__get_vtxn_stub(r), SVN_VA_NULL));
       apr_table_set(r->headers_out, SVN_DAV_ALLOW_BULK_UPDATES,
                     bulk_upd_conf == CONF_BULKUPD_ON ? "On" :
@@ -341,7 +342,7 @@ get_option(const dav_resource *resource,
             continue;
 
           apr_table_addn(r->headers_out, SVN_DAV_SUPPORTED_POSTS_HEADER,
-                         apr_pstrdup(resource->pool, posts_versions[i].post_name));
+                         apr_pstrdup(r->pool, posts_versions[i].post_name));
         }
     }
 
@@ -396,14 +397,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 +452,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 +504,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 +543,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 +566,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 +574,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 +593,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 +601,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 +631,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 +729,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,16 +746,16 @@ 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);
                   return err;
                 }
-              if (node_relation != svn_fs_node_same)
+              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 +774,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 +915,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 +941,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 +1022,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 +1155,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 +1184,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 +1432,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 +1440,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 +1537,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.");
         }