如何查找在clearcase分支下修改的文件 [英] How to find the files modified under a clearcase branch

查看:79
本文介绍了如何查找在clearcase分支下修改的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我修改并签入了分支下的一堆文件。现在,我需要获取修改后的文件列表。

I modified and checked-in a bunch of files under my branch. Now I need to get the list of files I modified. Is there any scripts to do so?

推荐答案

cleartool命令查找 应该可以帮助您找到给定分支上至少具有一个版本的任何元素(文件)。

The cleartool command find should help you find any element (file) with at least one version on a given branch.


以下内容将查找所有内容分支上的文件

The following will find all the files on a branch



cleartool find . -type f -branch "brtype(mybranch)" -print

请参见查找示例 cleartool find命令的其他示例以获取更多示例。

See find examples or "Additional examples of the cleartool find command" for more examples.

OP sarath 添加:


它给了我一个残破的文件名,带有@和其他字符。

it gives me a crippled file name with @ and other characters. Is it possible to get with normal path?

是真的,这样的命令会给你类似的东西(例如):

True, such a command would give you something like (as an example):

.\.checkstyle@@\main\MyBranch
.\.classpath@@\main\MyBranch_Int\MyBranch
.\.classycle@@\main\MyBranch_Int\MyBranch
.\.fbprefs@@\main\MyBranch_Int\MyBranch

仅获取路径,您有两种解决方案:

To get only the path, you have two solutions:

1 /寻找具有右分支的元素(而非版本):

1/ look for elements (and not versions) with the right branch:

cleartool find . -type f -ele "brtype(mybranch)" -print

(请注意 -ele 替换 -branch

将会得到:

(note the -ele replacing the -branch)
That would give:

.\.checkstyle@@
.\.classpath@@
.\.classycle@@
.\.fbprefs@@
.\.pmd@@

但是您仍然会遇到丑陋' @@

But you still have the "ugly" '@@'.

2 /将查找结果与exec指令相结合,该指令描述了用< a href = http://publib.boulder.ibm.com/infocenter/cchelp/v7r1m2/topic/com.ibm.rational.clearcase.cc_ref.doc/topics/fmt_ccase.htm rel = nofollow noreferrer> fmt_ccase 格式:

2/ combine the find with an exec directive which describe the element found with fmt_ccase format:

cleartool find . -type f -ele "brtype(mybranch)" -exec "cleartool descr -fmt \"%En\n\" \"%CLEARCASE_PN%\""

可读性的多行形式:

cleartool find . -type f -ele "brtype(mybranch)" \
  -exec "cleartool descr -fmt \"%En\n\" \"%CLEARCASE_PN%\""

请注意,所有内部双引号都必须转义。

Please note that all "inner" double quotes need to be escaped.

%En 将为您提供找到的元素的名称。

The %En will give you the name of the element found.

.\.checkstyle
.\.classpath
.\.classycle
.\.fbprefs
.\.pmd
.\.project
.\.settings\dico.txt

这篇关于如何查找在clearcase分支下修改的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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