如何让 ClearCase 将快照的子目录归档为早期版本?

发布于 2024-09-30 21:22:20 字数 507 浏览 2 评论 0原文

我对 ClearCase 并不是特别有经验,所以如果我的术语不正确,请告诉我。

在 Git 中我可以运行命令:

git archive -o /tmp/dump.zip $SHA_FROM_THE_PAST path/to/dump

我想在 ClearCase 中做类似的事情。

ClearCase 存储库包含两个分支:mainsnapshot_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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

只想待在家 2024-10-07 21:22:20

最简单的情况是您在创建快照之前在 main 上设置了标签。

但如果你没有这样的标签,你可以获取 snapshot_foo 分支创建之前的所有文件:

  • a/ cleartool descr -l brtype:snapshot_foo@/myVob 来获取为此分支创建
  • b/ 使用基于时间的选择规则创建快照视图 与此问题类似
    element /myPath/... /main/{!created_since(01-Sep-2008.12:34:56)}
    element /myPath/... /main/LATEST

(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:

  • a/ cleartool descr -l brtype:snapshot_foo@/myVob to get the date of creation for this branch
  • b/ make a snapshot view with a time-based selection rule similar to this question
    element /myPath/... /main/{!created_since(01-Sep-2008.12:34:56)}
    element /myPath/... /main/LATEST

(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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文