问题
I'm trying to write a C# program to compare files from different revisions in a StarTeam repository (see if there have been any changes between the current version of a file and a given prior checkin). I currently am able to find/checkout files from the current revision, but am having difficulty in finding the proper methods to then find past versions of these files.
The Borland documentation seems to be rather poor on the .NET side of things at least, could anyone point me in the right direction?
Thank you!
回答1:
Found the answer.
Given a current revision File, a past revision Item can be created via the File.GetFromHistoryByDate(DateTime) method. The returned Item can then be cast into a File object. If there is no revision history for that file for the given date, the returned objects will be null (but no other errors will be thrown).
If the older File is not null, the objects then can be compared with the File.MD5 hashes.
来源:https://stackoverflow.com/questions/4812359/finding-past-revisions-of-files-in-starteam-w-net-sdk-c-sharp