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

查看:143
本文介绍了如何使用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\"\n" | ct
ct lsco -r -cvi -fmt "unco -rm %n\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天全站免登陆