RTC - timestamp local files with actual check-in history time

1.2k Views Asked by At

RTC "Load" command extracts the repository files to the local workspace - fine.

What I find annoying/problematic is the modification timestamp on the local files is the timestamp of the "Load". I would expect it to be the time of the last check-in.

Is there a SCM/RTC command that will show the latest check-in timestamp for each file - I can then "pipe" this to touch or something.

2

There are 2 best solutions below

2
On

You can try something like:

lscm history -m 1 myfile

This will give you the identifier of the last changeset suffered by this file. With this identifier (say XXXX) you can go for:

lscm list changesets XXXX

This will give you detailed information on the XXXX changeset, including the moment of the change (in localized format; beware of your local installation of scmtools if you intend to automatize this in a script)

1
On

This isn't supported, and from the work item Enhancement 83718, this isn't likely to be supported just yet (even though there is a plan to do so).

The thread "timestamp problem when checking out" mentions:

Doing anything else will break date-based build systems like all but the most sophisticated variants of Make.

The thread "files loaded from source control do not preserve modify date" details:

This is currently not supported.

To explore the ramifications of this a bit ... what would you expect to happen if you "suspended" a change set in that workspace?

To be consistent with the rule that "the mod date of a file is its change-set creation date", the mod date on a reverted file would have to be changed to an earlier date. But then date-based build systems (like "make") would fail to recompile the reverted files (except for the few build systems like clearmake, which are designed to handle files changing both forward and backward in time).