Retaining original "modified date" of files

311 views
Skip to first unread message

Kim-Gau Ng

unread,
Aug 23, 2022, 11:50:40 AM8/23/22
to TortoiseSVN
Hi,

When uploading a folder to the SVN server, is there any way to make TortoiseSVN retain the original "modified date" of files and add a column to show these original dates, in addition to the commit date?

The original dates will provide some traceability when I am comparing files on my local computer with those on the SVN server. Without the original dates, the same file  committed twice for use in different folders will show different dates when, in fact, the contents of both files are exactly the same.

I will appreciate any help or advice. Thank you.

Sincerely,
Kim-Gau

Bruce C

unread,
Aug 23, 2022, 5:15:51 PM8/23/22
to TortoiseSVN
Hi,

Have you seen the discussion of a similar request on StackOverflow? It's from several years ago but I don't think things will have changed too much.
  • Short answer: no.
  • Longer answer: why would you want to?
  • Much longer answer: there may be convoluted ways to do so but very likely more effort than it's worth.
When I started with version control, I also felt like this would be useful to maintain file modification date/times. This was based on something I'd seen in shipping files were the file time was selected to reflect the product version number. However, with much more experience I find that it isn't useful - for me, and, I suspect, most others. I now better understand why changing file date/times is usually not helpful, as described in the TortoiseSVN documentation, in the section titled "Set file dates to the last commit time".

Your message doesn't include specific details of the intended usage, so it's only possible to comment generally. Such generalities might be less helpful than you'd hoped.

It's not clear, to me, why it would be a problem for there to be two files, in different folders, with the same content, even if the file date/times are different. Rather than using the modified date/time to compare files, it would seem better to use a diff tool to compare the file content directly. Many diff tools will allow two folders to be compared, including sub-folders, and all the contained files, or masked subset. Alternatively, if the deployment requires multiple checkouts of the files to different locations, the Check For Modifications option can be used to determine if any of the files have been edited locally, in each working copy (i.e. checkout).

I suspect that I simply don't understand the required usage and that you likely already know this information and suggestions, described above. If that's the case, sorry. However, it's possible that you might be better to adapt your usage to fit the way Subversion works, rather than trying to adapt the tool to do something it doesn't easily do.

Perhaps others might have better suggestions.

Hope this helps.

Andrzej Przybył

unread,
Mar 28, 2024, 10:38:39 AMMar 28
to TortoiseSVN
Nice that you explained it.
However, believe me, in some cases knowing the date when certain files were generated is very useful and even necessary.
For example, the date (and exact time!) of generating certain firmware-type executable files for drivers. In such cases, this date (and time) may be important for service purposes.

Regards
Andrzej P.

Daniel Sahlberg

unread,
Mar 28, 2024, 10:40:16 AMMar 28
to TortoiseSVN
Have  you tried this this setting?
image.png


--
You received this message because you are subscribed to the Google Groups "TortoiseSVN" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tortoisesvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/e38f4658-0b8a-4016-aeb2-201a6a393897n%40googlegroups.com.

Andrzej Przybył

unread,
Mar 29, 2024, 4:58:22 AMMar 29
to TortoiseSVN
This is not exactly what we are talking about, as the date and time of the original file is not the same as the date of its commit to the server.
For example, a given file may have been generated a week ago and is only now being committed to the server.

Andrzej

Daniel Sahlberg

unread,
Mar 29, 2024, 7:55:16 AMMar 29
to TortoiseSVN
fredag 29 mars 2024 kl. 09:58:22 UTC+1 skrev Andrzej Przybył:
This is not exactly what we are talking about, as the date and time of the original file is not the same as the date of its commit to the server.
For example, a given file may have been generated a week ago and is only now being committed to the server.

That information is not stored in the repository, as far as I know. The Subversion project would probably be interested in a patch, if you would like to contribute one. It should then be farily easy for TortoiseSVN to support it in an option.

Kind regards,
Daniel

Johan Corveleyn

unread,
Mar 29, 2024, 10:57:10 AMMar 29
to TortoiseSVN
Not tremendously helpful, but for completeness: this is a loooooong standing feature request (over 20 years old) of Subversion:

https://issues.apache.org/jira/browse/SVN-1256 -- Ability to preserve last modification time (mtime) of files under version control

If someone wants to take a closer look, I'd suggest first reading the comments on the above issue. I'm sure there are some useful bits of information in the midst of all the bumping and "why is this not implemented yet"-style comments.

--
Johan

Reply all
Reply to author
Forward
0 new messages