寻找过去StarTeam文件的修订W / .NET SDK / C# [英] Finding past revisions of files in StarTeam w/ .NET SDK / C#

查看:132
本文介绍了寻找过去StarTeam文件的修订W / .NET SDK / C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图写一个C#程序在StarTeam储存库,以比较不同版本的文件(看是否有过一个文件的当前版本和事前签有任何的变化)。目前我能找到从当前版本/签文件,但我有找到正确的方法,然后找到这些文件的以前版本的难度。

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.

Borland的文档似乎是对事物至少.NET方比较差,任何人都可以点我在正确的方向?

The Borland documentation seems to be rather poor on the .NET side of things at least, could anyone point me in the right direction?

感谢您!

推荐答案

找到了答案。

鉴于当前的修订文件,过去的修订项目,可通过创建在File.GetFromHistoryByDate(DateTime的)方法。然后,返回的项目可以转换成一个File对象。如果该文件在指定日期没有修订历史记录,返回的对象将是空的(但没有其他错误将被抛出)。

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

如果旧的文件是非空,对象,则可以用File.MD5哈希进行比较。

If the older File is not null, the objects then can be compared with the File.MD5 hashes.

这篇关于寻找过去StarTeam文件的修订W / .NET SDK / C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆