Uploaded image for project: 'Subversion'
  1. Subversion
  2. SVN-2719

How subversion determines whether a file has changed is not documented

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.4.x
    • Fix Version/s: unscheduled
    • Component/s: docs
    • Labels:
      None

      Description

      To determine whether a file has changed, subversion first checks whether the
      modification time of the file has changed to avoid costly full binary compares.
      This is a good idea, however users should be made aware of it through the
      documentation for the following reason.
      
      On POSIX Systems (don't know about others), file modification times can be set
      to arbitrary values (for example using "touch -t" or utime(3)). Some programs
      actually make use of this. In my case, it was GNU recode that resets the file
      modification time to its original value after recoding unless invoked using
      "-t"/"--touch". As is to be expected, subversion did not notice the files had
      changed and did not propagate the changes to the repository. I spent some time
      trying to find out what went wrong, especially since I found no pointers in the
      official documentation.
      
      I think the documentation should
      
      1) mention subversion's use of mtimes
      2) warn users that some programs may change a file's mtime, causing subversion
      to behave in unexpected ways.
      
      I further suggest that the documentation explicitly point out that recode may
      cause problems in that area and that it advise users always to invoke it as
      "recode -t" for files in a working copy.
      
      The discussion on users@subversion.tigris.org that triggered this bog report can
      be found at <http://subversion.tigris.org/servlets/ReadMsg?list=users&msgNo=62367>.
      
      best regards
      
      Lukas Reck
      

      Original issue reported by luq

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              subversion-importer Subversion Importer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: