使用 Rational Team Concert 或 RTC:如何恢复到历史某个点?

发布于 2024-11-14 19:52:36 字数 136 浏览 6 评论 0原文

在我的工作中,我们使用 RTC 作为 SCM。

这似乎是源代码控制管理的一个基本问题。
有没有办法将整个工作区回滚到过去的某个时间点?

我在“团队”下看到了历史记录选项,但这似乎仅适用于一个文件。

谢谢

At my Work we use RTC for SCM.

This seems like a basic question for Source Control Management.
is there a way to roll back an entire workspace to a point in the past?

I have seen the history option under "team" but that seems to only be for one file.

thanks

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

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

发布评论

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

评论(5

残月升风 2024-11-21 19:52:36

您还可以通过 IDE 替换基线中的组件或另一个工作区/流中的组件:

  • 在 Team Artifacts 视图或 Pending Changes 视图中,展开工作区以显示组件
  • ,选择组件并选择 Replace With >基线...或来自另一个工作区或流的组件...

如果要一次替换多个组件,您可以:

  • 打开工作区编辑器(选择“在工作区上打开”)
  • 在“组件”部分中
  • ,单击“添加... ”,选择源(基线、工作区/流或快照)以及
  • 当警告所选组件已在工作区中时的组件,单击“确定”以替换
  • “保存”

或者,如果您没有基线或其他工作区/流捕获您想要的过去的点,您可以:

  • 选择组件(在TA 或 PC 视图)
  • 选择​​显示 >历史记录(这显示组件的整个更改历史记录,而不仅仅是特定文件)
  • 选择您不希望的最近更改集
  • 选择“放弃...”

You can also replace a component from a baseline or component in another workspace/stream via the IDE:

  • in the Team Artifacts view or Pending Changes view, expand your workspace to show the components
  • select the component and choose Replace With > Baseline... or Component From Another Workspace or Stream...

If you want to replace multiple components at once, you can:

  • open the workspace editor (choose Open on the workspace)
  • in the Components section, click Add...
  • choose the source (baseline, workspace/stream, or snapshot) and which component(s)
  • when warned that the selected components are already in the workspace, click OK to replace
  • save

Or, if you don't have a baseline or other workspace/stream capturing the point in the past you want, you can:

  • select the component (in the TA or PC view)
  • choose Show > History (this shows the entire change history for the component, not just for a specific file)
  • select the recent change sets that you don't want
  • choose Discard...
云裳 2024-11-21 19:52:36

这取决于您过去如何指定该点。
如果您之前有确实代表所述点的基线,则根据

如果您没有工作空间,

scm create workspace my-ws
scm workspace add-components my-ws comp1 comp2
scm accept --baseline my-baseline --source src-ws --target my-ws
scm load my-ws

如果您已有工作区

scm workspace replace-components --baseline my-baseline my-ws workspace src-ws 

It depends how you specify that point in the past.
If you have previous baselines that do represent said point, then, according to this thread:

If you do not have a workspace,

scm create workspace my-ws
scm workspace add-components my-ws comp1 comp2
scm accept --baseline my-baseline --source src-ws --target my-ws
scm load my-ws

If you already have a workspace:

scm workspace replace-components --baseline my-baseline my-ws workspace src-ws 
年华零落成诗 2024-11-21 19:52:36

如果您没有基线,您还可以丢弃自您关心的时间以来已交付到流的更改集。

您可以通过调用 scm Discard 来完成此操作。要查找要丢弃的更改集,请使用 scm History

If you don't have a baseline, you can also discard the change sets that have been delivered to the stream since the time you care about.

You do that by calling scm discard <change-set-selector>. To find the change sets to discard, use scm history.

葮薆情 2024-11-21 19:52:36

您提到您想恢复整个工作区...只是为了澄清您的要求:
更改已签入存储库工作区。
签入的更改将传送到流。
与某些 SCM 系统的不同之处在于,它有一个两步过程。

您想恢复到工作区之前的状态吗?还是蒸汽?

恢复交付到流的变更集很容易,IBM 实际上有一些不错的 doco

如果您签入了对工作区的更改但没有交付...这将变得更加困难,您最好希望的是从 IDE 中的本地历史记录进行恢复。存储库工作区不存储历史记录。

You mentioned you want to revert an entire workspace... Just to clear up what you're asking:
Changes are checked-in to a repository workspace.
Checked-in changes are delivered to a stream.
Differing from some SCM systems in that there is a two step process.

Do you want to revert to a prior state in your workspace? or the steam?

Reverting a changeset delivered to a stream is easy, IBM actually has some decent doco on it.

If you checked in a change to your workspace but didn't deliver... it's going to be rougher, best you can hope for is restoring from local history in your IDE. The repository workspace doesn't store history.

想挽留 2024-11-21 19:52:36

仅当您想恢复到上次检查的版本时,下面的答案才会对您有所帮助。

在 RTC IDE 中:

  1. 转至“待处理的更改”选项卡
  2. 右键单击​​要回滚的文件夹
  3. 撤消

检查下图 :)

图片显示了 Rational Team Concert 中待处理的更改选项卡

The answer below will help you only if you want to revert to the last checked version.

In the RTC IDE:

  1. Go to the Pending Changes tab
  2. Right click on the folder/s that you want to rollback
  3. Undo

Check the Image below :)

The picture shows the pending changes tab in the Rational Team Concert

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