古尔塞的完整历史记录 [英] full clearcase history for gource

查看:60
本文介绍了古尔塞的完整历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图获取 clearcase vob 的完整历史记录以进行解析并将其与 gource 一起使用,以直观地了解所做的更改,但我没有找到正确的命令以获取易于记录的日志历史记录,以便使用 clearcase2gource python脚本进行解析。我不使用UCM,没有流,只有普通的Cleacase。



通过此命令,我在路径中间使用@@元素:

  cleartool lshistory -fmt元素:%n |日期:%d |用户:%u |操作:%e |对象:%[type ] p | SimpleType:%m | OperationKind:%o\n -all / vobs / vob_name 

使用此命令,我得到这样的元素(在某些时候删除):

 元素:/ vobs / vob_name / dir1 @@ / main / branch_dev / 2 / dir2 / main / branch_pilot / 1 / file @@ / main / branch_pilot / 1 |日期:2008-04-15T16:58:28 + 02:00 |用户:reeasjp |操作:创建版本|对象:compressed_file | SimpleType:版本| OperationKind:签入

由于中间有多个分支名称,这使得解析gource变得更加困难。 / p>

有什么方法可以获取仅包含简单目录和文件名的所有元素的完整历史记录?





注意:在配置规范中,我只是 / main / LATEST。

解决方案

问题是:







  e = d ['Element'] 
splitElement = e.split( @@)
d ['FileName'] = splitElement [0]
d ['StreamName'] = splitElement [1]
#StreamName以我们不感兴趣的/ main /开头。
#删除/ main /(切片为5,因为/ main /中有5个字符)
d ['StreamName'] = d ['StreamName'] [5:]




  • cleartool lshistory --all 将列出已删除元素的历史记录(在当前ClearCase视图中不再可见),因此将列出多个分支名称。



最简单的解决方案是:




  • 重定向将 cleartool lshistory 输出到文件,然后

  • 然后过滤掉所有不符合<$ c $的扩展路径c> clearcase2gource.py 期望:例如,仅用于测试,仅保留只是在特定分支中或在 / main 中,只是看效果是否更好。

  • 最终将文件作为输入到 clearcase2gource.py


I have tried to get the full history of a clearcase vob to parse it and use it with gource to get a visual representation of the changes, but I do not find the right commands to get an easy log history to parse with clearcase2gource python script. I do not use UCM, there are no streams, just plain cleacase.

With this command I get elements with @@ in the middle of a path:

cleartool lshistory -fmt "Element: %n| Date: %d| User:%u| Operation: %e| Object:%[type]p| SimpleType: %m| OperationKind: %o\n" -all /vobs/vob_name

With this command I get elements like this (deleted at some point):

Element: /vobs/vob_name/dir1@@/main/branch_dev/2/dir2/main/branch_pilot/1/file@@/main/branch_pilot/1| Date: 2008-04-15T16:58:28+02:00| User:reeasjp| Operation: create version| Object:compressed_file| SimpleType: version| OperationKind: checkin

That makes more difficult to parse for gource because of several branch names in the middle.

Is there any way to get a full history of all the elements with just plain directories and file names?

Thanks in advance.

NOTE: In the config Spec I have just "/main/LATEST".

解决方案

The issues are:

    e = d['Element']
    splitElement = e.split("@@")
    d['FileName'] = splitElement[0]
    d['StreamName'] = splitElement[1]
    # StreamName starts with /main/ which we aren't interested in.
    # Remove the /main/ (slice on 5 because there are 5 chars in /main/)
    d['StreamName'] = d['StreamName'][5:]

  • the cleartool lshistory --all will list history of deleted elements (non-visible anymore in the current ClearCase view), hence the multiple branch names.

The easiest solution would be to:

  • redirect the cleartool lshistory output to a file, and
  • then filter out all the extended paths which don't conform to clearcase2gource.py expectation: for instance, just for testing, keep only the ones in a specific branch or in /main only, just to see if that works better.
  • finally feed that file as input to clearcase2gource.py

这篇关于古尔塞的完整历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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