You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/01/21 13:52:20 UTC

svn commit: r1436319 - /subversion/trunk/subversion/libsvn_client/patch.c

Author: stsp
Date: Mon Jan 21 12:52:19 2013
New Revision: 1436319

URL: http://svn.apache.org/viewvc?rev=1436319&view=rev
Log:
* subversion/libsvn_client/patch.c: Add a comment explaining the quirks of
   how symlinks are handled.

Modified:
    subversion/trunk/subversion/libsvn_client/patch.c

Modified: subversion/trunk/subversion/libsvn_client/patch.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/patch.c?rev=1436319&r1=1436318&r2=1436319&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/patch.c (original)
+++ subversion/trunk/subversion/libsvn_client/patch.c Mon Jan 21 12:52:19 2013
@@ -801,6 +801,24 @@ write_file(void *baton, const char *buf,
   return SVN_NO_ERROR;
 }
 
+/* Handling symbolic links:
+ *
+ * In Subversion, symlinks can be represened on disk in two distinct ways.
+ * On systems which support symlinks, a symlink is created on disk.
+ * On systems which do not support symlink, a file is created on disk
+ * which contains "link TARGET" where TARGET is the file the symlink
+ * points to.
+ *
+ * When reading symlinks (i.e. the link itself, not the file the symlink
+ * is pointing to) through the svn_subst_create_specialfile() function
+ * into a buffer, the buffer always contains the "normal form" of the symlink,
+ * which looks like: "link TARGET"
+ * Due to this representation symlinks always contain a single line of text.
+ *
+ * The functions below are needed to deal with the case where a patch
+ * wants to change the TARGET that a symlink points to.
+ */
+
 /* Baton for the (readline|tell|seek|write)_symlink functions. */
 struct symlink_baton_t
 {