Finding past revisions of files in StarTeam w/ .NET SDK / C#

旧街凉风 提交于 2019-12-11 02:23:53

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!