如何使用 ClearCase 执行递归结账? [英] How do I perform a recursive checkout using ClearCase?

查看:21
本文介绍了如何使用 ClearCase 执行递归结账?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想检出指定文件夹的所有子目录中的所有文件.

I want to check out all files in all subdirectories of a specified folder.

(使用 GUI 执行此操作很痛苦,因为没有递归结帐选项).

(And it is painful to do this using the GUI, because there is no recursive checkout option).

推荐答案

注意:ClearCase 以文件为中心,而不是以存储库为中心(如 SVN 或 CVS).

Beware: ClearCase is File-centric, not repository centric (like SVN or CVS).

这意味着检出所有文件很少是一个好的解决方案(并且使用 ClearCase 可能会相当长;))

That means it is rarely a good solution to checkout all files (and it can be fairly long with ClearCase ;) )

话虽如此,这个问题是完全合理的,我想指出另一种方式:

That being said, the question is perfectly legitimate and I would like to point out another way:

在指定文件夹"中打开一个 cleartool 会话:

open a cleartool session in the 'specified folder':

c:MyFolder> cleartool
cleartool> co -c "Reason for massive checkout" .../*

也可以.但作为 aku 的答案,它确实检出所有内容:文件和目录......你可能最不需要检出目录!

does the trick too. But as the aku's answer, it does checkout everything: files and directories... and you may most not need to checkout directories!

cleartool find somedir -type f -exec "cleartool checkout -c "Reason for massive checkout" "%CLEARCASE_PN%""

只会检出文件...

现在的问题是检查已更改的所有内容.这是有问题的,因为通常并非所有内容都已更改,并且 CleaCase 在尝试签入相同文件时会触发错误消息.这意味着您将需要 2 个命令:

Now the problem is to checkin everything that has changed. It is problematic since often not everything has changed, and CleaCase will trigger an error message when trying to check in an identical file. Meaning you will need 2 commands:

ct lsco -r -cvi -fmt "ci -nc "%n"
" | ct
ct lsco -r -cvi -fmt "unco -rm %n
" | ct

('ct 是 'cleartool' :在 Windows 上键入 'doskey ct=cleartool $*' 以设置该别名)

(with 'ct being 'cleartool' : type 'doskey ct=cleartool $*' on Windows to set that alias)

请注意,ct ci -nc 将使用用于结帐阶段的注释进行签入.
所以它不是没有评论的签入(比如-nc选项——或者无评论"——可以让人相信).

Note that ct ci -nc will check-in with the comment used for the checkout stage.
So it is not a checkin without a comment (like the -nc option -- or "no comment" -- could make believe).

这篇关于如何使用 ClearCase 执行递归结账?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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