如何让 ClearCase 将快照的子目录归档为早期版本?
我对 ClearCase 并不是特别有经验,所以如果我的术语不正确,请告诉我。
在 Git 中我可以运行命令:
git archive -o /tmp/dump.zip $SHA_FROM_THE_PAST path/to/dump
我想在 ClearCase 中做类似的事情。
ClearCase 存储库包含两个分支:main
和 snapshot_foo
。snapshot_foo
在过去的某个时刻从 main
分支出来。
我想要的是在第一次创建快照时查看的所有文件的转储。
据我了解,没有像 Git 中那样的“全局”状态标识符;据我所知,在 ClearCase 中,每个元素都是单独版本的,因此不一定有与该命令的一对一等效项。
我考虑过从 main 的同一时间点开始创建一个新快照,然后从中复制我需要的内容,但我对如何去做感到困惑和困惑。
I'm not particularly experienced with ClearCase, so if my terminology is incorrect please let me know.
In Git I can run the command:
git archive -o /tmp/dump.zip $SHA_FROM_THE_PAST path/to/dump
I want to do something similar in ClearCase.
The ClearCase repository contains two branches: main
and snapshot_foo
.snapshot_foo
branches from main
at some point in the past.
What I want is a dump of all the files as they looked at the time the snapshot was first created.
I understand that there is no 'global' state identifier like there is in Git; in AFAIK, in ClearCase each element is versioned individually, so there will not necessarily be a one-to-one equivalent to that command.
I've thought about creating a new snapshot starting at the same point in time from main, and just copying what I need from that, but I am bewildered and confused as to how I would go about it.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最简单的情况是您在创建快照之前在 main 上设置了标签。
但如果你没有这样的标签,你可以获取 snapshot_foo 分支创建之前的所有文件:
cleartool descr -l brtype:snapshot_foo@/myVob
来获取为此分支创建(12小时34分56秒是创建之前的时间brtype
snapshot_foo
)(请参阅
config_spec
手册页)创建包含正确版本的快照视图后,您可以将其压缩内容,获得与您在问题中提到的 git archive 类似的结果。
The simplest case would be when you have set a label on main just before creating snapshot.
But if you have no such label, you can get all the files at the time just before the creation of the snapshot_foo branch:
cleartool descr -l brtype:snapshot_foo@/myVob
to get the date of creation for this branch(with 12h 34 minutes 56 seconds being the time just before the creation of the brtype
snapshot_foo
)(see the
config_spec
man page)Once the snapshot view is created with the right versions in it, you can zip its content, achieving a similar result to the
git archive
you mention in your question.