开发者

Using Rational Team Concert or RTC: How to reverting back to a point in history?

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 o开发者_如何学Cption under "team" but that seems to only be for one file.

thanks


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...


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 


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.


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.


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 :)

Using Rational Team Concert or RTC: How to reverting back to a point in history?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜