diff -uwr2 ../subversion-0.23.0_original/doc/book/book/ch06.xml ./doc/book/book/ch06.xml
--- ../subversion-0.23.0_original/doc/book/book/ch06.xml	Sun May 18 02:09:25 2003
+++ ./doc/book/book/ch06.xml	Wed Jun 18 11:18:54 2003
@@ -1489,4 +1489,26 @@
 
       </sect3>
+
+      <sect3 id="svn-ch-6-sect-2.3.7">
+        <title><literal>svn:text-time</literal></title>
+
+        <para>The <literal>svn:text-time</literal> property contains
+           the last modification time of files. It has the form of
+           <literal>2003-05-19T12:21:12.124121Z</literal> and can be 
+           changed by setting the file's modification time, along with
+           doing other changes to the file's data. </para>
+
+        <para>This information is used on <command>export</command>
+           to retrieve a complete state of the directory
+           tree. It is recorded on <command>add</command> and 
+           <command>import</command> and updated with every 
+           <command>commit</command>.</para>
+
+        <para>If you start with an empty directory and just add files, you 
+           won't see the property on your working directories' files.
+           You'll have to use the <command>checkout</command>-command
+           to see the <literal>svn:text-time</literal>-property. 
+           (That is because this property is generated on-the-fly.) </para>
+      </sect3>
     </sect2>
   </sect1>
diff -uwr2 ../subversion-0.23.0_original/subversion/include/svn_io.h ./subversion/include/svn_io.h
--- ../subversion-0.23.0_original/subversion/include/svn_io.h	Sun May 18 02:21:45 2003
+++ ./subversion/include/svn_io.h	Fri May 30 12:15:23 2003
@@ -30,8 +30,10 @@
 #include <apr_file_io.h>
 #include <apr_thread_proc.h>
+#include <apr_time.h>
 
 #include "svn_types.h"
 #include "svn_error.h"
 #include "svn_string.h"
+#include "svn_time.h"
 
 #ifdef __cplusplus
@@ -215,4 +217,24 @@
                                          svn_boolean_t ignore_enoent,
                                          apr_pool_t *pool);
+
+/** Set a file's mtime.
+ *  @a path is the utf8-encoded path to the file. 
+ * If @a ignore_enoent is @c TRUE, don't fail if the target
+ * file doesn't exist.
+ */
+svn_error_t *svn_io_set_file_mtime      (const char *path,
+                                         apr_time_t mtime,
+                                         svn_boolean_t ignore_enoent,
+                                         apr_pool_t *pool);
+
+/** Convenience function: returns a file's mtime as a char* and/or
+ *  a svn_string_t*. NULLs allowed.
+ */
+svn_error_t *
+svn_io_get_mtime_string    (const char *path,
+			    const char **char_p,
+			    svn_string_t **svn_st_p,
+                            apr_pool_t *pool);
+
 
 /** Determine whether a file is executable by the current user.  
diff -uwr2 ../subversion-0.23.0_original/subversion/include/svn_props.h ./subversion/include/svn_props.h
--- ../subversion-0.23.0_original/subversion/include/svn_props.h	Sun May 18 02:21:50 2003
+++ ./subversion/include/svn_props.h	Thu May 22 07:47:27 2003
@@ -146,4 +146,12 @@
 #define SVN_PROP_MIME_TYPE  SVN_PROP_PREFIX "mime-type"
 
+/** The (m)time of a given file. */
+#define SVN_PROP_TEXT_TIME  SVN_PROP_PREFIX "text-time"
+
+/** The (m)time-handling of a given file. currently allowed: 
+    none to use current behaviour
+    "text-time" to use that. */
+#define SVN_PROP_TEXT_TIME_HANDLING  SVN_PROP_PREFIX "text-time-ignore"
+
 /** The ignore patterns for a given directory. */
 #define SVN_PROP_IGNORE  SVN_PROP_PREFIX "ignore"
diff -uwr2 ../subversion-0.23.0_original/subversion/include/svn_wc.h ./subversion/include/svn_wc.h
--- ../subversion-0.23.0_original/subversion/include/svn_wc.h	Sun May 18 02:21:43 2003
+++ ./subversion/include/svn_wc.h	Wed Jun 18 10:46:48 2003
@@ -1592,4 +1592,8 @@
 svn_boolean_t svn_wc_is_entry_prop (const char *name);
 
+/** Return true iff @a name is a volatile property, ie one,
+    that can change without being explicitly set by the user.
+    Example: svn:text-time, the modification time of files. */
+svn_boolean_t svn_wc_is_volatile_prop (const char *name);
 
 
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_client/commit.c ./subversion/libsvn_client/commit.c
--- ../subversion-0.23.0_original/subversion/libsvn_client/commit.c	Sun May 18 02:18:24 2003
+++ ./subversion/libsvn_client/commit.c	Thu May 22 07:38:43 2003
@@ -130,4 +130,17 @@
                                        pool));
   
+  /* set svn:text-time from the current mtime */
+    {
+      const char *time_str;
+      apr_time_t tstamp;
+
+      SVN_ERR (svn_io_file_affected_time (&tstamp, path, pool));
+      time_str = svn_time_to_cstring (tstamp, pool);
+      SVN_ERR (editor->change_file_prop (file_baton, SVN_PROP_TEXT_TIME,
+                                         svn_string_create(time_str, pool),
+                                         pool));
+    }
+
+
   if (ctx->notify_func)
     (*ctx->notify_func) (ctx->notify_baton,
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_client/commit_util.c ./subversion/libsvn_client/commit_util.c
--- ../subversion-0.23.0_original/subversion/libsvn_client/commit_util.c	Sun May 18 02:18:28 2003
+++ ./subversion/libsvn_client/commit_util.c	Wed Jun 18 09:59:30 2003
@@ -981,4 +981,13 @@
   parent_baton = ((void **) db_stack->elts)[*stack_ptr - 1];
 
+  /* to save the new timestamp of files, we'll assume that the property
+   * "text-time" was changed - if this entry was not deleted. 
+   * in svn_wc_transmit_prop_deltas() the property 
+   * SVN_PROP_TEXT_TIME_HANDLING ("text-time-ignore") is checked,
+   * and if it is set, the property "text-time" is not automatically set. */
+  if (kind == svn_node_file && !(item->state_flags & SVN_CLIENT_COMMIT_ITEM_DELETE))
+    item->state_flags |= SVN_CLIENT_COMMIT_ITEM_PROP_MODS;
+
+
   /* If a feedback table was supplied by the application layer,
      describe what we're about to do to this item.  */
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_client/export.c ./subversion/libsvn_client/export.c
--- ../subversion-0.23.0_original/subversion/libsvn_client/export.c	Sun May 18 02:18:33 2003
+++ ./subversion/libsvn_client/export.c	Thu May 22 07:38:43 2003
@@ -221,4 +221,5 @@
   const svn_string_t *keywords_val;
   const svn_string_t *executable_val;
+  apr_time_t text_time;
 
   /* Any keyword vals to be substituted */
@@ -392,4 +393,7 @@
     fb->executable_val = svn_string_dup (value, pool);
 
+  else if (strcmp (name, SVN_PROP_TEXT_TIME) == 0)
+    return (svn_time_from_cstring(&fb->text_time, value->data, pool));
+
   /* Try to fill out the baton's keywords-structure too. */
   else if (strcmp (name, SVN_PROP_ENTRY_COMMITTED_REV) == 0)
@@ -472,4 +476,7 @@
   if (fb->executable_val)
     SVN_ERR (svn_io_set_file_executable (fb->path, TRUE, FALSE, pool));
+
+  if (apr_time_sec(fb->text_time))
+    SVN_ERR (svn_io_set_file_mtime (fb->path, fb->text_time, FALSE, pool));
 
   if (fb->edit_baton->notify_func)
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_subr/io.c ./subversion/libsvn_subr/io.c
--- ../subversion-0.23.0_original/subversion/libsvn_subr/io.c	Sun May 18 02:19:34 2003
+++ ./subversion/libsvn_subr/io.c	Fri May 30 12:29:24 2003
@@ -663,4 +663,57 @@
 
 svn_error_t *
+svn_io_set_file_mtime      (const char *path,
+                            apr_time_t mtime,
+                            svn_boolean_t ignore_enoent,
+                            apr_pool_t *pool)
+{
+  apr_status_t status;
+  const char *path_apr;
+  int handle;
+  struct timeval times[2];
+
+  SVN_ERR (svn_path_cstring_from_utf8 (&path_apr, path, pool));
+
+  /* set the atime to current */
+  gettimeofday(times+0,NULL);
+  times[1].tv_sec=apr_time_sec(mtime);
+  times[1].tv_usec=apr_time_usec(mtime);
+
+  /* there is currently no apr-function for that. */
+  if (utimes(path_apr,times))
+  {
+    if (errno == ENOENT && ignore_enoent)
+      return SVN_NO_ERROR;
+
+    return svn_error_createf (errno, NULL,
+        "svn_io_set_file_mtime: "
+        "failed to change mtime of file '%s'",
+        path);
+  }
+
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
+svn_io_get_mtime_string    (const char *path,
+			    const char **char_p,
+			    svn_string_t **svn_st_p,
+                            apr_pool_t *pool)
+{
+  const char *time_str;
+  apr_time_t tstamp;
+
+  SVN_ERR (svn_io_file_affected_time (&tstamp, path, pool));
+  time_str = svn_time_to_cstring (tstamp, pool);
+
+  if (char_p) *char_p=time_str;
+  if (svn_st_p) *svn_st_p=svn_string_create(time_str, pool);
+  
+  return SVN_NO_ERROR;
+}
+
+
+svn_error_t *
 svn_io_is_file_executable(svn_boolean_t *executable, 
                           const char *path, 
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/adm_crawler.c ./subversion/libsvn_wc/adm_crawler.c
--- ../subversion-0.23.0_original/subversion/libsvn_wc/adm_crawler.c	Sun May 18 02:20:07 2003
+++ ./subversion/libsvn_wc/adm_crawler.c	Wed Jun 18 08:00:53 2003
@@ -750,4 +750,18 @@
   if (props_base)
     SVN_ERR (svn_wc__load_prop_file (props_base, baseprops, pool));
+
+  /* set the property text-time to the mtime of the file,
+   * if text-time-ignore is not set. */
+  if (entry->kind == svn_node_file && 
+      !apr_hash_get(localprops, SVN_PROP_TEXT_TIME_HANDLING,
+                    strlen(SVN_PROP_TEXT_TIME_HANDLING)) ) 
+    {
+      svn_string_t *time_str;
+
+      SVN_ERR( svn_io_get_mtime_string (path, NULL, &time_str, pool) );
+      apr_hash_set(localprops, 
+                   SVN_PROP_TEXT_TIME, strlen(SVN_PROP_TEXT_TIME),
+                   time_str);
+    }
   
   /* Get an array of local changes by comparing the hashes. */
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/adm_ops.c ./subversion/libsvn_wc/adm_ops.c
--- ../subversion-0.23.0_original/subversion/libsvn_wc/adm_ops.c	Sun May 18 02:20:02 2003
+++ ./subversion/libsvn_wc/adm_ops.c	Wed Jun 18 08:00:43 2003
@@ -42,4 +42,5 @@
 #include "svn_md5.h"
 #include "svn_xml.h"
+#include "svn_time.h"
 
 #include "wc.h"
@@ -997,7 +998,7 @@
     {
       /* If this is a new file being added instead of a file copy,
-         then try to detect the mime-type of this file and set
-         svn:executable if the file is executable.  Otherwise, use the
-         values in the original file. */
+       * then try to detect the mime-type of this file, set svn:executable 
+       * if the file is executable, and save the mtime.  
+       * Otherwise, use the values in the original file. */
       if (! copyfrom_url)
         {
@@ -1022,4 +1023,14 @@
                                         parent_access, pool));
             }
+
+          /* set svn:text-time from the current mtime */
+            {
+              svn_string_t *time_str;
+
+              SVN_ERR ( svn_io_get_mtime_string (path, NULL, &time_str, pool) );
+              SVN_ERR ( svn_wc_prop_set (SVN_PROP_TEXT_TIME, time_str, path,
+                                        parent_access, pool));
+            }
+
         }
     }
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/props.c ./subversion/libsvn_wc/props.c
--- ../subversion-0.23.0_original/subversion/libsvn_wc/props.c	Sun May 18 02:19:40 2003
+++ ./subversion/libsvn_wc/props.c	Wed Jun 18 10:54:15 2003
@@ -34,4 +34,5 @@
 #include "svn_string.h"
 #include "svn_pools.h"
+#include "svn_props.h"
 #include "svn_path.h"
 #include "svn_xml.h"
@@ -125,5 +126,4 @@
     }
 
-
   /* Done building our array of user events. */
   *local_propchanges = ary;
@@ -195,5 +195,5 @@
   /* If both changes set the property, it's a conflict iff the values
      are different */
-  else if (! svn_string_compare (local->value, update->value))
+  if (! svn_string_compare (local->value, update->value))
     {
       *description =
@@ -292,4 +292,42 @@
 
 
+/* Append (if they do not exist) or overwrite the "generated"
+   properties of the given file, eg. modification-time. */
+svn_error_t *svn_wc__calc_file_props (const char *textfile_path,
+                                     apr_hash_t *hash,
+                                     svn_boolean_t overwrite,
+                                     apr_pool_t *pool)
+{
+  /* Pretend to have a svn:text-time property, 
+   * even if it's not in the property file. */
+/*
+  if (!apr_hash_get(hash, SVN_PROP_TEXT_TIME_HANDLING,
+                    strlen(SVN_PROP_TEXT_TIME_HANDLING)) )
+    {
+      const char *time_str;
+
+      time_str = svn_io_get_mtime_string (path, pool);
+
+      apr_hash_set(hash,
+                   SVN_PROP_TEXT_TIME, strlen(SVN_PROP_TEXT_TIME),
+                   svn_string_create(time_str, pool) );
+    }
+*/
+
+  if (overwrite || 
+!apr_hash_get(hash, SVN_PROP_TEXT_TIME, strlen(SVN_PROP_TEXT_TIME)))
+    {
+      svn_string_t *time_str;
+
+      SVN_ERR( svn_io_get_mtime_string (textfile_path, NULL, &time_str, pool) );
+      apr_hash_set(hash,
+                   SVN_PROP_TEXT_TIME, strlen(SVN_PROP_TEXT_TIME),
+		   time_str);
+    }
+
+  return SVN_NO_ERROR;
+}
+
+
 /*---------------------------------------------------------------------*/
 
@@ -521,7 +559,9 @@
       const svn_string_t *value;
       svn_boolean_t is_normal;
+      svn_boolean_t is_volatile;
 
       update_change = &APR_ARRAY_IDX (propchanges, i, svn_prop_t);
       is_normal = svn_wc_is_normal_prop (update_change->name);
+      is_volatile = svn_wc_is_volatile_prop (update_change->name);
       value = update_change->value 
               ? svn_string_dup (update_change->value, pool) 
@@ -534,6 +574,7 @@
       /* We already know that state is at least `modified', so mark
          that, but remember that we may later upgrade to `merged' or
-         even `conflicted'. */
-      if (state && is_normal)
+         even `conflicted'.
+         The volatile properties (eg text-time) are not reported as modified. */
+      if (state && is_normal && !is_volatile)
         *state = svn_wc_notify_state_changed;
 
@@ -564,4 +605,24 @@
           if (conflict)
             {
+              /* If the property is the time-stamp of the file, 
+               * take the newer one. */
+              if (strcmp(update_change->name, SVN_PROP_TEXT_TIME) == 0)
+                {
+                  apr_time_t tlocal, tupdate;
+
+                  SVN_ERR(svn_time_from_cstring(&tlocal, 
+                                                local_change->value->data, pool));
+                  SVN_ERR(svn_time_from_cstring(&tupdate, 
+                                                update_change->value->data, pool));
+
+                  apr_hash_set (localhash,
+                                update_change->name, APR_HASH_KEY_STRING,
+                                tlocal > tupdate ? 
+                                local_change->value : 
+                                update_change->value);
+                  /* do next property. must go back here to for-loop */
+                  continue;
+                } 
+
               /* Found one!  Reflect the conflict in the notification state. */
               if (state && is_normal)
@@ -1271,4 +1332,11 @@
 
 
+svn_boolean_t
+svn_wc_is_volatile_prop (const char *name)
+{
+  return strcmp(name, SVN_PROP_TEXT_TIME) == 0;
+}
+
+
 /* Helper to optimize svn_wc_props_modified_p().
 
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/props.h ./subversion/libsvn_wc/props.h
--- ../subversion-0.23.0_original/subversion/libsvn_wc/props.h	Sun May 18 02:20:16 2003
+++ ./subversion/libsvn_wc/props.h	Fri May 23 13:32:31 2003
@@ -81,4 +81,12 @@
 
 
+/* Append (if they do not exist) or overwrite the "generated"
+   properties of the given file, eg. modification-time. */
+svn_error_t *svn_wc__calc_file_props (const char *textfile_path,
+                                     apr_hash_t *hash,
+                                     svn_boolean_t overwrite,
+                                     apr_pool_t *pool);
+
+
 
 /* Given a HASH full of property name/values, write them to a file
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/status_editor.c ./subversion/libsvn_wc/status_editor.c
--- ../subversion-0.23.0_original/subversion/libsvn_wc/status_editor.c	Sun May 18 02:19:46 2003
+++ ./subversion/libsvn_wc/status_editor.c	Wed Jun 18 10:49:01 2003
@@ -406,5 +406,6 @@
 {
   struct dir_baton *db = dir_baton;
-  if (svn_wc_is_normal_prop (name))    
+  if (svn_wc_is_normal_prop (name) &&
+     !svn_wc_is_volatile_prop (name))    
     db->prop_changed = TRUE;
   return SVN_NO_ERROR;
diff -uwr2 ../subversion-0.23.0_original/subversion/libsvn_wc/update_editor.c ./subversion/libsvn_wc/update_editor.c
--- ../subversion-0.23.0_original/subversion/libsvn_wc/update_editor.c	Sun May 18 02:19:52 2003
+++ ./subversion/libsvn_wc/update_editor.c	Thu May 22 07:38:43 2003
@@ -1485,4 +1485,5 @@
             if ((! strcmp (propchange->name, SVN_PROP_EXECUTABLE))
                 || (! strcmp (propchange->name, SVN_PROP_KEYWORDS))
+                || (! strcmp (propchange->name, SVN_PROP_TEXT_TIME_HANDLING))
                 || (! strcmp (propchange->name, SVN_PROP_EOL_STYLE)))
               magic_props_changed = TRUE;
diff -uwr2 ../subversion-0.23.0_original/subversion/tests/clients/cmdline/svntest/tree.py ./subversion/tests/clients/cmdline/svntest/tree.py
--- ../subversion-0.23.0_original/subversion/tests/clients/cmdline/svntest/tree.py	Sun May 18 02:15:23 2003
+++ ./subversion/tests/clients/cmdline/svntest/tree.py	Wed Jun 18 09:22:18 2003
@@ -301,4 +301,6 @@
     name = string.strip(name)
     value = string.strip(value)
+    # ignore this property, as it SHOULD change.
+    if name != "svn:text-time":
-    props[name] = value
+      props[name] = value
 

