Ant脚本cccheckin/cccheckout使用CCRC插件来eclipse?

发布于 2024-08-06 05:21:14 字数 106 浏览 2 评论 0原文

在使用 CCRC 插件进行 Eclipse 的同时,是否可以使用 Ant 脚本签入/签出源代码元素?我收到一条错误消息,指出脚本尝试签出的元素不是 VOB 的一部分,但它当然在那里,我可以手动签出。

Is it possible to use Ant scripts to checkin/checkout source code elements while using the CCRC plugin to eclipse? I am getting an error message saying that the element the script is attempting to check out is not part of the VOB, but of course it is there and I can check it out manually.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

鲸落 2024-08-13 05:21:15

应该可以将这些 Ant ClearCase 任务 与 CCRC 视图(“web视图”,与快照视图类似)

像这样的脚本应该可以工作:

<project name="Testing ClearCase    " default="CC" basedir=".">
 <target name="CC">
    <property name="FileSrc" value="MyView/MyVob/MyDir"/>
    <property name="dist" value="dist"/>
    <cccheckout viewpath="${FileSrc}/myFile"
        reserved="false"
        nowarn="true"
        comment="Auto Build from script"
        failonerr="false" />
    <copy file="${dist}/myFile" tofile="${FileSrc}/myFile"/>
    <cccheckin viewpath="${FileSrc}/myFile"
        comment="Checked in by myFile.xml ANT script"
        nowarn="false"
        failonerr="false"
        identical="true"/>
  </target>
</project>

但是您需要确保当前目录(在此脚本中)位于更新 Web CCRC 视图“myView”的位置之上。

我知道的唯一问题是:

It should be possible to use those Ant ClearCase tasks with CCRC views ("web views" which are anologous to snapshot views)

A script like this one should work:

<project name="Testing ClearCase    " default="CC" basedir=".">
 <target name="CC">
    <property name="FileSrc" value="MyView/MyVob/MyDir"/>
    <property name="dist" value="dist"/>
    <cccheckout viewpath="${FileSrc}/myFile"
        reserved="false"
        nowarn="true"
        comment="Auto Build from script"
        failonerr="false" />
    <copy file="${dist}/myFile" tofile="${FileSrc}/myFile"/>
    <cccheckin viewpath="${FileSrc}/myFile"
        comment="Checked in by myFile.xml ANT script"
        nowarn="false"
        failonerr="false"
        identical="true"/>
  </target>
</project>

But you need to make sure your current directory is (in this script) just above where you update your web CCRC view "myView".

The only issues I know of are:

孤寂小茶 2024-08-13 05:21:15

VonC答案中的Ant ClearCase任务使用cleartool命令(org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase.java中的getClearToolCommand() )。当我调用 cleartool 操作时,即使是在 CCRC 视图内部或之上,我也会收到问题中的错误消息。

现在(自 VonC 的回答以来已经过去了几年)可以使用 CCRC CLI 来代替(http://www-01.ibm.com/support/docview.wss?uid=swg24021929,将 CCSHARED 设置为顶级 \eclipse 目录)。这些命令与 cleartool 提供的命令类似,尽管它似乎不支持 UCM 来解决您进行签出的问题,所以我首先必须使用 CCRC eclipse 插件在流上设置活动。

要使 CCRC CLI 与 ant ClearCase 任务配合使用,需要将任务更改为:

  1. 调用 rcleartool 而不是 cleartool
  2. 由于 cleartool 指向 .exe,而 rcleartool 是用于加载 jar 的 bat,因此 ProcessBuilder 将无法处理新命令(我使用 rcleartool.batcmd \c rcleartool.bat 进行了测试,除非您将 jar 转换为 exe。

The Ant ClearCase tasks in VonC's answer use the cleartool command (getClearToolCommand() in org.apache.tools.ant.taskdefs.optional.clearcase.ClearCase.java). When I invoke a cleartool operation, even from within or above the CCRC view, I get the error message from the question.

Now (as some years have passed since VonC's answer) there is a CCRC CLI that can be used instead (http://www-01.ibm.com/support/docview.wss?uid=swg24021929, setting CCSHARED to your top level \eclipse directory). The commands are similar to those provided by cleartool, although as it appears not to support UCM to solve your problem of doing a check out I first had to set an activity on the stream using the CCRC eclipse plugin.

To get the CCRC CLI to work with the ant ClearCase tasks would require changing the task to:

  1. Call rcleartool rather than cleartool.
  2. Since cleartool points to an .exe and rcleartool is a bat for loading a jar, ProcessBuilder won't be able to process the new command (I tested with rcleartool.bat and cmd \c rcleartool.bat) unless you convert the jar to an exe.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文