如何回滚签入 Clearcase 的文件?

发布于 2024-08-19 12:04:07 字数 165 浏览 3 评论 0 原文

我的 Clearcase 存储库中有一个文件。我检查了它并修改了它,然后重新检查了它。

我没有做任何事情,比如制定基线、变基或在我的流/视图中交付。

我很遗憾对此文件进行了更改——回想起来,我应该撤消签出。

如何回滚修改? (或者撤消,或者恢复,或者任何正确的术语。)

I have a file in my Clearcase repository. I checked it out and modified it, and then checked it back in.

I haven't done anything like make a baseline, or rebase, or deliver in my stream/view.

I regret having made the changes to this file--I should have undone the checkout, in retrospect.

How do I roll back the modifications? (Or undo, or revert, or whatever the correct nomenclature is.)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(4

木落 2024-08-26 12:04:07

描述了什么 skwllsp 可以在 动态视图通过使用扩展路径名

cd m:/myDynamicView/MyVob/path/to/file
cleartool lsvtree myFile
cleartool checkout -c "cancel co" myFile
copy myFile@@/main/xx myFile
cleartool checkin -nc myFile

其中 xx 为版本号你想要恢复。


但是,如果您进行了多次签入,包括您想要取消的一些签入,ClearCase 允许您通过减法合并
请参阅 IBM“删除某些版本的贡献”(以及合并 手册页

您可以一次性删除一系列版本中的所有更改。例如,以下命令删除主分支上版本 14 到 16 的修订:

  • 在 UNIX 系统或 Linux 上:
cleartool merge -graphical -to opt.c -delete -version /main/14 /main/16
  • 在 Windows 系统上:
cleartool merge -graphical -to opt.c -delete -version \main\14 \main\16

您还可以一次删除一个版本的更改。例如,以下命令仅从检出当前视图的 opt.c 版本中删除版本 14 中的更改:

  • 在 UNIX 系统或 Linux 上:
cleartool merge -graphical -to opt.c -delete -version /main/14
  • 在 Windows 系统上:
cleartool merge -graphical -to opt.c -delete -version \main\14

或者,在上面的任何示例中,如果您使用贡献者版本选择器的版本扩展路径,则可以省略 -version 参数。


最后,不要做的一件事rmver
该命令会不可挽回地破坏信息,这很少是一件好事。

What is described by skwllsp can be be done in a dynamic view through the use of extended pathnames

cd m:/myDynamicView/MyVob/path/to/file
cleartool lsvtree myFile
cleartool checkout -c "cancel co" myFile
copy myFile@@/main/xx myFile
cleartool checkin -nc myFile

with xx being the version number you want to restore.


But should you have made multiple checkins, including some you want to cancel, ClearCase allows you to cancel part of the previous checkins through Subtractive Merge
See IBM "to remove contributions of some versions" (and merge man page)

You can remove all changes from a range of versions at once. For example, the following command removes revisions to versions 14 through 16 on the main branch:

  • On the UNIX system or Linux:
cleartool merge -graphical -to opt.c -delete -version /main/14 /main/16
  • On the Windows system:
cleartool merge -graphical -to opt.c -delete -version \main\14 \main\16

You can also remove the changes from one version at a time. For example, the following commands remove only the changes in version 14 from the version of opt.c checked out the current view:

  • On the UNIX system or Linux:
cleartool merge -graphical -to opt.c -delete -version /main/14
  • On Windows systems:
cleartool merge -graphical -to opt.c -delete -version \main\14

Alternatively, in any of the examples above, you can leave out the -version argument if you use the version extended path for the contributor-version-selector.


Finally, the one thing to not do is a rmver.
This command destroys information irretrievably and this is rarely a good thing.

且行且努力 2024-08-26 12:04:07

Clearcase 可以做得比仅仅制作一个新版本并撤消更改要好得多!
打开文件的版本历史记录,找到您错误签入的版本,然后销毁它(选择要销毁的版本并在版本菜单下找到相应的命令)。
如果您想使用命令行,这也是 rmver 所做的。
正如 VonC 所说,这将无可挽回地摧毁你的错误。我没有看到这有什么缺点。

Clearcase can do much better than just making a new version where you undo the change!
Open the version history on your file, find the version you mistakenly checked in, and destroy it (select version to destroy and find the appropriate command under the Versions menu).
This is what rmver does too, if you want to use the command line.
As VonC said your this destroys your mistake irretrievably. I'm not seeing a downside to that.

热风软妹 2024-08-26 12:04:07

打开此文件的版本历史记录,然后在编辑器中从版本树中打开该文件的正确版本,再次检出文件,将其替换为之前正确版本的内容并检入。不要忘记比较之前的版本版本和最后一个版本。

Open version history for this file, then open in your editor a proper version of the file from the version tree, check out file once more, replace its with content of the previous correct version and check in. Don't forget to compare the previous version and the last version.

尝蛊 2024-08-26 12:04:07

cleartool unco @filename 应该可以为您完成这项工作。

但是,如果创建分支的主分支/分支中的版本随版本一起前进,则当您撤消签出时,将获取新版本而不是您分支的版本。

cleartool unco @filename should do the job for you.

But if the version in the main branch/ branch from where your branch is created, goes forward with versions, when you undo your checkout, the new version is acquired instead of the version from which you branched.

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