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 2014/03/26 20:43:06 UTC

svn commit: r1582023 - /subversion/trunk/subversion/libsvn_ra_serf/update.c

Author: rhuijben
Date: Wed Mar 26 19:43:06 2014
New Revision: 1582023

URL: http://svn.apache.org/r1582023
Log:
Following up on r1557207, properly handle <S:fetch-props /> requests from
servers in the ra-serf transition based xml parser.

This resolves a regression of the trunk code against Subversion <= 1.8 when
talking to Subversion 1.6 or earlier repositories in non bulk mode.

Most likely this resolves issue #4486.

The easiest way to reproduce a hard failure I could find was
$ svn co http://svn.webdav.org/repos/projects/neon/trunk neon \
      --config-option servers:global:http-bulk-updates=false

(Neon is hosted by a Subversion 1.3 mod_dav_svn)

* subversion/libsvn_ra_serf/update.c
  (report_state_e): Add fetch props, and document a few other states that may
    be seen with older repositories.
  (update_ttable): Add a few missing states.
  (update_opened): Handle fetch-props.
  (update_closed): Add commented handlers for 3 special properties.

Modified:
    subversion/trunk/subversion/libsvn_ra_serf/update.c

Modified: subversion/trunk/subversion/libsvn_ra_serf/update.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_serf/update.c?rev=1582023&r1=1582022&r2=1582023&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Wed Mar 26 19:43:06 2014
@@ -84,12 +84,19 @@ typedef enum report_state_e {
   PROP,
 
   FETCH_FILE,
+  FETCH_PROPS,
   TXDELTA,
 
   CHECKED_IN,
   CHECKED_IN_HREF,
 
   MD5_CHECKSUM
+#if 0
+,
+  VERSION_NAME,
+  CREATIONDATE,
+  CREATOR_DISPLAYNAME
+#endif
 } report_state_e;
 
 
@@ -193,8 +200,16 @@ static const svn_ra_serf__xml_transition
 
   { OPEN_FILE, S_, "prop", PROP,
     FALSE, { NULL }, FALSE },
+#if 0
+  { OPEN_DIR, S_, "prop", PROP,
+    FALSE, { NULL }, FALSE },
+#endif
   { ADD_FILE, S_, "prop", PROP,
     FALSE, { NULL }, FALSE },
+#if 0
+  { ADD_DIR, S_, "prop", PROP,
+    FALSE, { NULL }, FALSE },
+#endif
 
   { OPEN_FILE, S_, "txdelta", TXDELTA,
     FALSE, { "?base-checksum" }, TRUE },
@@ -214,6 +229,20 @@ static const svn_ra_serf__xml_transition
   { PROP, V_, "md5-checksum", MD5_CHECKSUM,
     TRUE, { NULL }, TRUE },
 
+  /* These are only reported for <= 1.6.x mod_dav_svn */
+  { OPEN_DIR, S_, "fetch-props", FETCH_PROPS,
+    FALSE, { NULL }, FALSE },
+  { OPEN_FILE, S_, "fetch-props", FETCH_PROPS,
+    FALSE, { NULL }, FALSE },
+
+#if 0
+  { PROP, D_, "version-name", VERSION_NAME,
+    TRUE, { NULL }, TRUE },
+  { PROP, D_, "creationdate", CREATIONDATE,
+    TRUE, { NULL }, TRUE },
+  { PROP, D_, "creator-displayname", CREATOR_DISPLAYNAME,
+    TRUE, { NULL }, TRUE },
+#endif
   { 0 }
 };
 
@@ -1765,6 +1794,15 @@ update_opened(svn_ra_serf__xml_estate_t 
             }
         }
         break;
+
+      case FETCH_PROPS:
+        {
+          if (ctx->cur_file)
+            ctx->cur_file->fetch_props = TRUE;
+          else if (ctx->cur_dir)
+            ctx->cur_dir->fetch_props = TRUE;
+        }
+        break;
     }
 
   return SVN_NO_ERROR;
@@ -2038,6 +2076,23 @@ update_closed(svn_ra_serf__xml_estate_t 
             }
         }
         break;
+#if 0
+      case VERSION_NAME:
+        {
+          SVN_DBG(("Version: %s", cdata ? cdata->data : NULL));
+        }
+        break;
+      case CREATIONDATE:
+        {
+          SVN_DBG(("Date: %s", cdata ? cdata->data : NULL));
+        }
+        break;
+      case CREATOR_DISPLAYNAME:
+        {
+          SVN_DBG(("Author: %s", cdata ? cdata->data : NULL));
+        }
+        break;
+#endif
     }
 
   return SVN_NO_ERROR;