开发者

How to display recent changes and logs for current view spec in clearcase?

newbie for clearcase.

Since clearcase's config is rather different from 开发者_Python百科other concept in git, I may mean logs for any files with specified version/branch path.

Like I want to show log for all element match:

element * .../specified-lable-or-branch/


First you need to be aware of the differences between ClearCase and Git, ClearCase being file-centric (no notion of repository-wide revision or commit)

You can display logs for any visible file by typing:

cleartool lshistory /myView/myVob/path/to/myFile

See lshistory man page. (and also How do I understand about ClearCase event records in the VOB database)

The lshistory command lists event records in reverse chronological order, describing operations that have affected a VOB's data.

  • File system data history.
    Lists events concerning elements, branches, versions, and VOB links.
    This includes records for creation and deletion of objects, and records for attaching and removal of annotations: version labels, attributes, and hyperlinks.

Another kind of logs is the lsvtree (history of versions):

The lsvtree command lists part or all of the version tree of one or more elements.
By default, the listing includes all branches of an element's version tree except for obsolete branches.

alt text http://youtrack.jetbrains.net/_persistent/tree.PNG?file=74-3724&v=1&c=true


The OP adds:

How can I display all history for elements match a pattern like has new version under a branch?

You can combine almost any commands with a find query.

Windows syntax:

cleartool find . -name "apattern" -exec "cleartool lshistory \"%CLEARCASE_PN%\""
cleartool find . -version "{created_since(target-data-time)}" -exec "cleartool lshistory \"%CLEARCASE_PN%\""

Unix syntax:

cleartool find . -name "apattern" -exec 'cleartool lshistory "$CLEARCASE_PN"'
cleartool find . -version "{created_since(target-data-time)}" -exec 'cleartool lshistory "$CLEARCASE_PN"'

For the " like has new version under a branch?" specifically:

cleartool find . -version "brtype(mybranch)" -exec ...

should do it (any element which has no version created for that branch will not be listed).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜