gpt4 book ai didi

clearcase-remote-client - 如何使用 CCRC 的非交互模式?

转载 作者:行者123 更新时间:2023-12-02 04:53:04 26 4
gpt4 key购买 nike

我在 Windows 机器上使用 rcleartool 8.0.0.6。有没有办法使用rcleartool非交互模式?

例如,如果我输入:rcleartool lsview -s,客户端会要求我在交互模式下输入服务器 URL、用户名/密码。

有没有办法使用 rcleartool lsview -s -username [username] -pass [password] -server [server]?
我想在我的 java 代码中使用该命令,所以非交互模式应该更好?
有什么建议吗?

最佳答案

ClearTeam 8.x

如“The ClearCase 8.x remote client command-line interface (rcleartool)”中所述:

rcleartool is the command-line interface to the IBM Rational ClearCase remote client (CCRC).
This interface, first released as a separate download for compatibility with V7.1.2.x and later releases, is delivered in V8.0.0.3 with the changes that are described in this document.

rcleartool login 不是 caching credentials before (7.x) .
它现在应该缓存这些凭证。

CR 3508提到增强已于 2013 年 6 月 14 日交付 RFE(增强请求):

In CCRC CLI single-line mode, you should only specifiy your login credentials once.

rcleartool 的 session 缓存已在 8.0.0.3 中交付

这意味着在一个 rcleartool login -lname xxx -server xxx -password xxx 之后,所有其他 rcleartool 命令不再需要登录/密码。


ClearCase 7.x

您可以尝试并按照 IBM 文章“How to run rcleartool without entering username, password and server URL every time

建议修改rcleartool.bat脚本。

原因

Normally when one runs rcleartool (not under rcleartool prompt), he needs to input username, password and server URL every time.

For instance:

rcleartool lsvob -username myusername -password mypassword -server  http://myserver:12080/TeamWeb/services/Team

rcleartool lsview -username myusername -password mypassword -server http://myserver:12080/TeamWeb/services/Team

回答

You can backup the original rcleartool.bat (rcleartool under UNIX) and then modify that file as follows:

Locate the following line in rcleartool.bat

"%_JAVACMD%" -Djava.util.logging.config.file="%CCRCCLI%/logging.properties" -cp "%CM_API_DIR%\stpwvcm.jar";"%CM_API_DIR%\stpcmmn.jar";"%CM_API_DIR%\stpcc.jar";"%CM_API_DIR%\remote_core.jar";"%CM_API_DIR%\commons-httpclient-3.0.jar";"%CM_API_DIR%\commons-codec-1.3.jar";"%CCRCCLI%\commons-cli-1.1.jar";"%CM_API_DIR%\icu4j-3_8.jar";"%CM_API_DIR%\commons-logging-1.0.4.jar";"%CCRCCLI%\rcleartool.jar" com.ibm.rational.ccrc.cli.command.ClearWan %*
Add the username, password and server URL at the end

"%_JAVACMD%" -Djava.util.logging.config.file="%CCRCCLI%/logging.properties" -cp "%CM_API_DIR%\stpwvcm.jar";"%CM_API_DIR%\stpcmmn.jar";"%CM_API_DIR%\stpcc.jar";"%CM_API_DIR%\remote_core.jar";"%CM_API_DIR%\commons-httpclient-3.0.jar";"%CM_API_DIR%\commons-codec-1.3.jar";"%CCRCCLI%\commons-cli-1.1.jar";"%CM_API_DIR%\icu4j-3_8.jar";"%CM_API_DIR%\commons-logging-1.0.4.jar";"%CCRCCLI%\rcleartool.jar" com.ibm.rational.ccrc.cli.command.ClearWan %* -username myusername -password mypassword -server http://myserver:12080/TeamWeb/services/Team

After making the above change, rcleartool can be used without entering a username, password and server URL every time.

For instance,

rcleartool lsvob
rcleartool lsview

Note that there is still a need for running rcleartool directly (not in rcleartool prompt) such as:

  • Being able to capture the result with > operator.
  • Being able to run in a batch file.

关于clearcase-remote-client - 如何使用 CCRC 的非交互模式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18506049/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com