Clearcase 相当于 hg shelve

Clearcase equivalent to hg shelve

是否有等同于 hg shelve 的 ClearCase(或 git stash 用于其他说服)?我能想到的最接近的是取消签出并保存保留文件,但这意味着我必须在之后寻找保留文件,重新签出文件并合并。我意识到 ClearCase 和 Mercurial/Git 背后有不同的哲学,但如果有任何工作可以使 ClearCase 更 "usable".

我会很感兴趣

listed a few for other version control tools,但 none 用于 ClearCase。
我解释了,ClearCase UCM, that a shelve command isn't easy to implement.

除了保存 .keep 文件,您还可以保存补丁(.keep 与其原始版本之间的 unix 差异),因为稍后可以重新应用补丁。

另一种方法是修改配置规范(在非 UCM 视图中更容易)以便在新分支中检查当前修改的版本(参见
然后您可以决定稍后合并该分支。

理念完全不同。 在 Clearcase 中,如果您需要处理另一个 branch/release,您通常必须使用另一个 Clearcase 视图。如果您有 Clearcase/UCM,则更是如此,因为您将使用附加到另一个 UCM 流的另一个视图。您将无法使用相同的视图,而在 Git 中,您将能够坚持使用相同的克隆并执行 git 存储、git 检出以开始工作在另一个版本中。

现在假设您需要为同一个版本开发另一个功能。在 Clearcase/UCM 下,您将能够创建一个新的 activity(cleartool mkact) and work on this new activity, using the same view. All the changes made will then be associated with this new activity. You will also be able to switch back to the previous activity using the command cleartool setact. The tricky part is if you need to deliver the activities separately. This will not necessarily possible as you might need to deliver both at the same time depending on the content of the changeset. This doc about determining dependent UCM activities is quite useful. If you need to move some changeset between activities, you can use the command cleartool chactivity 使用 -fcset 和 -tcset 选项。

总而言之,使用 Clearcase UCM,如果是针对不同的版本,请切换视图和流。如果是同一版本,请尝试使用 UCM 活动,因为它不如 git stash 灵活。