subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1436319 - /subversion/trunk/subversion/libsvn_client/patch.c
Date Mon, 21 Jan 2013 12:52:20 GMT
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
 {



Mime
View raw message