gpt4 book ai didi

linux - 如何在clearcase vob中实现 "cp -u"功能?

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:37:11 27 4
gpt4 key购买 nike

我们有两个 vob,分别是“voba”和“vobb”。并且在两个 vob 中都有一个目录“abc”并且包含相同的 .h/.cpp 文件。

通常,“voba”中“abc”目录中的文件更新相当频繁。有时,我想从“abc of voba”更新“abc of vobb”中的所有文件,这意味着:

  1. checkout vobb.abc 中的更新文件,覆盖它们,然后 checkin 。
  2. 将新建的文件复制到vobb.abc,创建元素。
  3. 删除对应voba.abc的vobb.abc中已删除的文件。

如果是普通的linux目录,我想cp -u然后实现。但是涉及到clearcase,我只能手工完成上面的1-3。

有什么简单的方法可以自动完成更新吗?

最佳答案

这在 ClearCase 中称为 clearfsimport (可能与 -mirror option 一起使用)

由于两个vob的目录abc中的元素完全不同(不同的oid,不同的历史),你可以做的是导入abc的内容从一个 vob 到另一个 vob:clearfsimport 将自动 check out 、更新和检入仅在源中已演化并需要在目标中更新的文件。


注意,这个recent thread (March 2013)还指出了 perl 脚本 ClearCase::SyncTree

It is superior to clearfsimport in many respects, especially in its evil twin avoidance (it will try with the proper options to link suitable entries from non visible versions).

描述:

This module provides an infrastructure for programs which want to synchronize a set of files, typically a subtree, with a similar destination subtree in VOB space. The enclosed synctree script is an example of such a program.

The source area may be in a VOB or may be a regular filesystem; the destination area must be in a VOB.
Methods are supplied for adding, subtracting, and modifying destination files so as to make that area look identical to the source.

Symbolic links are supported, even on Windows (of course in this case the source filesystem must support them, which is only likely in the event of an MVFS->MVFS transfer). Note that the text of the link is transported verbatim from source area to dest area; thus relative symlinks may no longer resolve in the destination.

关于linux - 如何在clearcase vob中实现 "cp -u"功能?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15529658/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com