c# - 如何从 ClearCase 下载文件?

标签 c# asp.net visual-studio-2012 clearcase

您好 ClearCase 专家,

我只想从 Clear Case 下载最新版本的文件,我有该文件的完整路径和 Clear Case View 名称。我们也可以放心地假设只有一个分支。

我寻找清除工具命令 HERE但是,对于我的目的来说,它们似乎都没有用。

我不想进行 checkout / checkin 等操作。我只想要最新版本的文件。不过,要求相当简单。我无法完成此操作,因为我没有看到任何直接的方法来执行此操作。

请帮忙。

附加信息: 我正在使用带有 Clear Case Addons 的 Visual studio 2012(C#,ASP.NET)。

感谢任何帮助!!.

最佳答案

方法是使用cleartool get .

Use the get command to copy a specified version of a file element into your snapshot view.
You must issue the get command from the root directory of a snapshot view or any directory below it.

示例:

On a Windows system, copy \dev\hello_world\foo.c@@\main\2 into the C:\build directory.

cleartool get -to C:\build\foo.c.temp \dev\hello_world\foo.c@@\main\2

这是使用 ClearCase 扩展路径来访问给定版本,如“In ClearCase, how can I view old version of a file in a static view, from the command line? ”中所示。
另一个答案指出了一种访问文件内容的方法:

cleartool find yourFile -ver 'brtype(aBranch) && version(.../aBranch/LATEST) && ! version(.../aBranch/0)' -exec 'cleartool diff -ser empty "$CLEARCASE_XPN"'

这将专门查找给定分支上文件的最新版本。

关于c# - 如何从 ClearCase 下载文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18715706/

相关文章:

c# - 如何在 XmlNodeList 的 foreach 中使用反向?

asp.net - 如何确定服务器控件的客户端名称?

c# - 为什么不能在方法末尾添加 goto 标签?

c# - 执行服务器端 XML 处理时出错

c# - ASP.NET 将图片添加到 TableCell

javascript - 从 JS 变量获取数据并设置在 ASP.NET 变量中

c# - 哪个本地数据库适合Windows 8 Store Apps?

c# - 从代码构建 visual studio 解决方案

c# - 如何使用 C# 读取列和行?

c# - 指定具体类型而不是 var