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

5

5

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

Amygdalin answered 10/6, 2011 at 19:30 Comment(0)
D
4

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 
Diarrhoea answered 10/6, 2011 at 21:3 Comment(0)
R
8

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...
Redheaded answered 22/6, 2011 at 16:31 Comment(0)
D
4

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 
Diarrhoea answered 10/6, 2011 at 21:3 Comment(0)
L
1

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.

Lemons answered 13/6, 2011 at 13:12 Comment(0)
K
0

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.

Kirtley answered 11/6, 2011 at 1:20 Comment(0)
R
0

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

Romanic answered 6/3, 2013 at 16:58 Comment(1)
While this revers you back a little, It is hardly an awnser to reverting back to a arbitrary point in time...Fiducial

© 2022 - 2024 — McMap. All rights reserved.