Clearcase:合并两个文件

Clearcase: Merging two files

我已经在我的 activity 分支中检查了一个文件说 "a.c",它在 clearcase 中有来自主线的版本 3,我对该文件做了一些更改。

现在我想在主线上签入该文件,但主线上该文件的最新版本现在是 7。

我想将更改放入该文件,因此它将创建该文件的版本 8。

那么我该如何签入才能将我的更改合并到最新版本的文件中。换句话说,我有一个文件的第三个版本,我想对文件的最新版本进行更改

甚至在交付之前,在 UCM 动态或快照视图中,一个简单的检查应该会触发合并。

如果有任何冲突,cleartool mergetool 将弹出。

就是这样 this technote details:

To merge the latest version with your checkout

When you first check in (on Windows systems, issue the Check In command for) a non-latest version of an element, one of the following actions occur:

  • On the UNIX system and Linux, you see a message that the version you checked out is not the latest on the branch, and the checkin is prevented.
    Enter a command in the following format:

    cleartool merge -graphical -to file-or-directory-in-your-view \
        file-or-directory-name@@/main/LATEST 
    

    Using the -graphical option starts the Diff Merge or, if you merge XML versions, the XML Diff Merge tool.
    The argument on -to specifies your checked out element.
    The other argument is a version-extended pathname that specifies the latest version on the branch on which you are working (see the pathnames_ccase reference page for a complete description of syntax).
    After the merge completes, save the results and check in the version by entering the cleartool checkin command from the view.

  • On Windows systems, a window opens and asks whether you want to merge the file now. If you choose to merge, an automatic merge is attempted. If your input is needed to complete the merge, the Diff Merge or XML Diff Merge tool starts. After the merge completes, you are prompted to check in the element.

听起来您正在使用 Base ClearCase 分支来完成您的工作。在这种情况下,您有几种选择。您可以而且应该在您的私有分支上检查工作,然后进行合并操作...

选项包括但不限于:

  1. 使用手动 cleartool 合并命令。
  2. 运行 "cleartool lsvtree -gra {file}" 或使用 "version tree" clearcase 上下文菜单项来调出版本树。右键单击当前版本,您将看到合并到任何其他版本的选项...
  3. 如果您正在使用视图配置文件并使用私有分支完成,则 ClearCase 主页中有一个 "finish private branch" 选项。
  4. 如果您在已更新的同一分支上未保留地检出,您可以使用 vtree 浏览器或命令提示符向前合并您的更改并将它们检入。