2

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.

TenG
  • 3,843
  • 2
  • 25
  • 42

2 Answers2

1

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).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thank you. I take the point about why timestamp support is not there. Given a file name, what lscm command would give me the timestamp info that might allow me to "touch" the file ? – TenG Aug 24 '13 at 20:34
1

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)

Jorge_B
  • 9,712
  • 2
  • 17
  • 22
  • I have tried with RTC 3.0.1, where there is a command 'lastmod'; however, it only works with directories :( – Jorge_B Nov 25 '14 at 15:29
  • This commands assume that you have previously logged yourself by typing lscm login -r YourRepository -u YourUser -P YourPassword, etc. – Jorge_B Nov 25 '14 at 15:30