You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by Apache subversion Wiki <co...@subversion.apache.org> on 2013/12/16 12:12:14 UTC

[Subversion Wiki] Update of "MtimePreservation" by JulianFoad

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Subversion Wiki" for change notification.

The "MtimePreservation" page has been changed by JulianFoad:
https://wiki.apache.org/subversion/MtimePreservation?action=diff&rev1=7&rev2=8

Comment:
Comment on the svn:text-time format.

  Nearly every modern operating system associates a "modified time" with each file on the system, updating it whenever the file is modified. This metadata can be very important, but Subversion currently offers no way to preserve it.
  
  This design proposes adding a new 'svn:text-time' property to store the modified time of each file or directory in UTC time using the format 'YYYY-MM-DDTHH:MM:SS.UUUUUU'. The name of this property was chosen because it is already used in an identical manner by FSVS and svntar.
+ 
+  ''[JAF] ''''''According to [[http://svn.apache.org/repos/asf/subversion/trunk/subversion/include/svn_props.h|svn_props.h]], t''he format has a 'Z' on the end''.
  
  == Rules ==
   * The svn:text-time property is only relevant when the node is in the repository and at the moment of going into or out of the repository.
@@ -26, +28 @@

  
  == mtime-usage ==
  A new client-side configuration option named 'mtime-usage' should be introduced to specify how Subversion treats a node's mtime during an update operation.  It can be one of the following options:
+ 
   * text-time-or-now (default; sets mtime=svn:text-time if possible, else sets mtime=stime)
   * text-time-or-commit-time (sets mtime=svn:text-time if possible, else sets mtime=ctime)
   * now (sets mtime=stime; identical to current default behaviour)
@@ -44, +47 @@

  
  === svn update ===
  (The following logic is applied after the file has been updated.)
+ 
   * If mtime-usage == now, mtime = stime
   * Else if mtime-usage == commit-time, mtime = ctime
   * Else if text-time is defined:
@@ -85, +89 @@

  The build system 'make' defines a specific set of output files for a specific set of input files. Whenever the output files are built, their mtime is set to stime. Whenever rebuilding, it checks to see if mtime of the the input files is newer than the mtime of the output files and rebuilds them if that's the case.
  
  Implementation:
+ 
   * The output files must not be under version control.
   * The input files must not have text-time set.
  
@@ -92, +97 @@

  Log files are often opened and resaved, even when nothing is written to them. This is not expected to count as a modification.
  
  Implementation:
+ 
   * text-time must not be set on the log files.
  
  ==== Compiler-generated files ====
  When building software, the compiler may be configured to output a compiler-generated file. These often get re-generated with identical output, only modifying the mtime. This is not expected to count as a modification.
  
  Implementation:
+ 
   * text-time must not be set on the output files.
   * To reduce the number of unnecessary generations, it should also not be set on the input files.
  
@@ -108, +115 @@

  In this scenario, the user stores uncompressed images in one folder and then runs a script to compress the images and dump them in another folder. The compression tool can generate slightly different bitstreams on different computers. Both folders are required to be under version control, and should avoid recompressing images that have not changed.
  
  Implementation:
+ 
   * Auto-props should be set up to add text-time to both the input and output image files.
   * Any existing files must have text-time added manually.
   * The script must set the mtime of each output file to the mtime of the matching input file and only recompress when the mtimes differ.
@@ -116, +124 @@

  In this scenario, Subversion is primarily used to detect modified files and upload them to an off-site server; version control is only used in rare cases, such as a file being backup up after it was corrupted.
  
  Implementation:
+ 
   * Auto-props should be set up to add text-time to all files.
   * Any existing file must have text-time added manually.
  
@@ -123, +132 @@

  Some users maintain their mtime to refer to the publication date of a file. It should be possible to locate a document based on its mtime, even if that document was committed weeks after it was modified.
  
  Implementation:
+ 
   * Auto-props should be set up to add text-time to all document files.
   * In an un-mixed environment, matching '*' would be sufficient.
   * Any existing files must have text-time added manually.
@@ -131, +141 @@

  Web servers expose the mtime as the 'Last-Modified-Date' header in http requests, which is used in a variety of ways. Clients use it to determine whether or not the file needs to be re-cached, reducing bandwidth for the server. Search engines use it to determine if the page needs to be reindexed, or when the user requests to find a page matching a certain date range. Users use it when they need to determine if the information on a page is obsolete. Web servers also offer index pages, which show all the files in a directory and allow the user to sort by mtime.
  
  Implementation:
+ 
   * Auto-props should be set up to add text-time to all document files.
   * Web sites are often mixed environments, so some file types may have to be excluded to ensure tools like 'make' continue to work.
   * Any existing document files must have text-time added manually.