You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by gs...@apache.org on 2010/03/22 11:07:06 UTC

svn commit: r926016 - /subversion/trunk/subversion/libsvn_wc/workqueue.c

Author: gstein
Date: Mon Mar 22 10:07:05 2010
New Revision: 926016

URL: http://svn.apache.org/viewvc?rev=926016&view=rev
Log:
Implement the creation of "special" files in the file-install work item.

* subversion/libsvn_wc/workqueue.c:
  (run_file_install): move the source stream fetching earlier, as we'll
    need it for all types of installation. implement the special file
    handling, as a simple call to svn_subst_create_specialfile().

Modified:
    subversion/trunk/subversion/libsvn_wc/workqueue.c

Modified: subversion/trunk/subversion/libsvn_wc/workqueue.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/workqueue.c?rev=926016&r1=926015&r2=926016&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/workqueue.c (original)
+++ subversion/trunk/subversion/libsvn_wc/workqueue.c Mon Mar 22 10:07:05 2010
@@ -1930,15 +1930,27 @@ run_file_install(svn_wc__db_t *db,
   use_commit_times = svn_skel__parse_int(arg1->next, scratch_pool) != 0;
   record_fileinfo = svn_skel__parse_int(arg1->next->next, scratch_pool) != 0;
 
+  /* Get the pristine contents (from WORKING or BASE, as appropriate).  */
+  SVN_ERR(svn_wc__get_pristine_contents(&src_stream, db, local_abspath,
+                                        scratch_pool, scratch_pool));
+
   SVN_ERR(svn_wc__get_special(&special, db, local_abspath, scratch_pool));
   if (special)
     {
-      NOT_IMPLEMENTED();
-    }
+      /* When this stream is closed, the resulting special file will
+         atomically be created/moved into place at LOCAL_ABSPATH.  */
+      SVN_ERR(svn_subst_create_specialfile(&dst_stream, local_abspath,
+                                           scratch_pool, scratch_pool));
+
+      /* Copy the "repository normal" form of the special file into the
+         special stream.  */
+      SVN_ERR(svn_stream_copy3(src_stream, dst_stream,
+                               cancel_func, cancel_baton,
+                               scratch_pool));
 
-  /* Get the pristine contents (from WORKING or BASE, as appropriate).  */
-  SVN_ERR(svn_wc__get_pristine_contents(&src_stream, db, local_abspath,
-                                        scratch_pool, scratch_pool));
+      /* No need to set exec or read-only flags on special files.  */
+      return SVN_NO_ERROR;
+    }
 
   /* Fetch all the translation bits.  */
   SVN_ERR(svn_wc__get_eol_style(&style, &eol, db, local_abspath,