Announcement

Collapse
No announcement yet.

User property for file modification date/time

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • User property for file modification date/time

    Hello,

    I have no experience on SVN, therefore I'd like to ask here how to implement a user property so that it is automatically maintained and used by checkout / checkin.


    Background:
    I want SVN to preserve the original file modification date.
    Afaik, SVN does set the file date/time to the check-out time, or, by an option, to the last check-in time.

    I read in some discussions that there is no standard way to change this, but by using a "custom property", it shall be possible to
    - preserve at check-in the file modification date/time
    - reassign that preserved date/time to the file at check-out
    and all of that shall me done automatically by the svn server.



    Unfortunately, I am completely inexperienced on SVN.

    So I'd like to ask you to support me, to give me help and instruction how to do this.
    I did'nt found any existing entry discussing this...


    Thanks in advance

    Henri

  • #2
    There's a lot to be concerned about when preserving timestamps with respect to building. Check out this StackOverflow page:

    https://stackoverflow.com/questions/...-on-subversion

    Check out the 1st answer (the one with 50-ish upvotes). But read the others. You will need the background to understand how this will impact your build automation.

    Comment


    • #3
      Originally posted by DougR View Post
      There's a lot to be concerned about when preserving timestamps with respect to building. Check out this StackOverflow page:

      https://stackoverflow.com/questions/...-on-subversion

      Check out the 1st answer (the one with 50-ish upvotes). But read the others. You will need the background to understand how this will impact your build automation.
      Thanks for the response.

      Exactly this post I meant with "I read some discussions" - and I found no other one with this topic.
      Yes, I read all responses, even some are out of the TE focus.

      For me, it is essential to keep the file modification timestamp - it is, apart of (binary) content comparison, the fastest and also easiest indicator for any kind of non-svn tools like comparers etc so see if the file is changed.
      The other point is, that if I am offline and travelling, then the timestamp is the only way to see if and when the file was changed.

      Thats the reason why I want to preserve the files modification dates at checkin and restore it at checkout.

      My only one problem and my question is, because I have no deep knowledge of svn: how to do this?


      Regards

      Henri

      Comment


      • #4
        Thank you.

        Yes, exactly this discussion on stack overflow I meant with "I read in some discussions that ..."

        But at most, it does not help me, because most of answers are out of TO's question.

        Anyway, for me it is essential too to preserve the original file modification date.

        Checkin time, ceckout time, all of that is - on level of file - not of interest for me.

        And most of non-svn tools like comparers etc do use the files modification date.
        Content comparison is also possible, shure, but will take much more time.

        And especially if I am offline, having no contact to the repository, then the files modification date is the only one indicator to see if and when it was changed (yesterday, last month, 5 years ago - this is an important information).

        So I know what I want:
        - on checkin, the files modification date must be saved
        - on checkout, it must be reassigned to the file.

        The only one problem is: because I have absolutely no deep knowledge of svn, I don't know how to do it.

        So I am looking for an easy howto ....

        Regards

        Henri

        Comment


        • #5
          Most comparers (e.g. diff) do not use timestamps: they compare content. While the highly respected "rsync" program can use "time stamps" it is much better at doing backups, etc. when it uses checksums (the "-c" option).

          Given how much I know about timestamps I distrust them immensely. Before I go much further, what specific OS are you running your client on?

          Comment


          • #6
            Hello Doug

            thank you for the response.
            I understand your point of view - but mine is different, according to my previous explanations.


            And I understand your answer so that you can't and don't want help me.


            So I'm still looking for somewhere else who can help me to solve my request, as it is still:

            - on checkin, the files modification date shall be saved
            - on checkout, it must be reassigned to the file.

            As I read, this can be done by using a "custom property", but I have no experience to that.

            Comment


            • #7
              I didn't say I wouldn't help - just that I'm not sure how. The reality is that preserving the mtime has been requested in SVN for a very long time. See http://subversion.tigris.org/issues/...ug.cgi?id=1256 . And it has yet to be implemented. The closest that they have is preservation of the commit time.

              Comment

              Working...
              X