subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1582047 - /subversion/trunk/subversion/libsvn_ra_serf/update.c
Date Wed, 26 Mar 2014 20:37:12 GMT
Author: rhuijben
Date: Wed Mar 26 20:37:11 2014
New Revision: 1582047

URL: http://svn.apache.org/r1582047
Log:
Following up on r1557207 and r1582023, explicitly handle incomming
last_change_* values from the main update request even when not in
send-all mode.

This resolves an assertion that is reproducable by

$ svn co http://svn.webdav.org/repos/projects/neon/trunk neon -r 0 \
      --config-option servers:global:http-bulk-updates=false

* subversion/libsvn_ra_serf/update.c
  (report_state_e): Enable the special property values added
    in r1582023.
  (update_ttable): Enable entry prop transitions.
  (update_closed): Directly forward these properties to the file/directory.

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=1582047&r1=1582046&r2=1582047&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_ra_serf/update.c (original)
+++ subversion/trunk/subversion/libsvn_ra_serf/update.c Wed Mar 26 20:37:11 2014
@@ -90,13 +90,11 @@ typedef enum report_state_e {
   CHECKED_IN,
   CHECKED_IN_HREF,
 
-  MD5_CHECKSUM
-#if 0
-,
+  MD5_CHECKSUM,
+
   VERSION_NAME,
   CREATIONDATE,
   CREATOR_DISPLAYNAME
-#endif
 } report_state_e;
 
 
@@ -200,16 +198,12 @@ 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 },
@@ -235,14 +229,12 @@ static const svn_ra_serf__xml_transition
   { 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 }
 };
 
@@ -2076,23 +2068,45 @@ 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));
+          const char *propname;
+
+          if (ctx->cur_file)
+            SVN_ERR(ensure_file_opened(ctx->cur_file, scratch_pool));
+          else if (ctx->cur_dir)
+            SVN_ERR(ensure_dir_opened(ctx->cur_dir, scratch_pool));
+          else
+            break;
+
+          switch (leaving_state)
+            {
+              case VERSION_NAME:
+                propname = SVN_PROP_ENTRY_COMMITTED_REV;
+                break;
+              case CREATIONDATE:
+                propname = SVN_PROP_ENTRY_COMMITTED_DATE;
+                break;
+              case CREATOR_DISPLAYNAME:
+                propname = SVN_PROP_ENTRY_LAST_AUTHOR;
+                break;
+              default:
+                SVN_ERR_MALFUNCTION(); /* Impossible to reach */
+            }
+
+          if (ctx->cur_file)
+            SVN_ERR(ctx->editor->change_file_prop(ctx->cur_file->file_baton,
+                                                  propname, cdata,
+                                                  scratch_pool));
+          else
+            SVN_ERR(ctx->editor->change_dir_prop(ctx->cur_dir->dir_baton,
+                                                  propname, cdata,
+                                                  scratch_pool));
         }
         break;
-#endif
     }
 
   return SVN_NO_ERROR;



Mime
View raw message