5

I maintain build files in our project and I often need to make related changes in projects spread to multiple components. Currently, I check-in (using Eclipse plugin) each component separately, pasting in the same comment.

Is there a way to do it at once for all the components loaded to my workspace?

Machavity
  • 30,841
  • 27
  • 92
  • 100
Pavel
  • 436
  • 3
  • 15

2 Answers2

4

I think you're asking two questions:

  1. Can I commit into multiple components at once?
  2. Can I set the comment on multiple change sets at once?

To commit everything, you can hit the Check-in All Pending Changes button, which looks like:

Check-in All button highlighted

To set the comment on multiple change sets, select them and hit F2. It may be easier to switch views to the "change set oriented view" by clicking on the delta dropdown (second from the left on the image above).

Erigami
  • 804
  • 1
  • 8
  • 20
  • So istead of scripting, the "Check-in all pending Changes" does the same thing? Perfect. +1. Could you tell me if my answer about the link between a changeset and a component was accurate though? – VonC Jun 28 '11 at 17:14
  • Great, I overlooked this button on the toolbar.. Also the tip about selecting multiple outgoing changes and editing a comment for all of them at once is really useful. Thanks! – Pavel Jun 30 '11 at 07:50
1

I am not sure you can perform a checkin on multiple components, considering the nature of the changeset a checkin is creating:

changeset (at least in RTC2.x, the documentation isn't online yet for the recent RTC3.0.x)

A change set cannot include changes to more than one component.
A change set cannot include changes that have not been checked in. (Such changes accumulate in the component's Unresolved folder, visible in the Pending Changes view, until you either check them in or undo them.)
Each component in a repository workspace has zero or more active change sets.
If you have multiple components in a workspace, separate change sets are created for each component.

So unless you script it with scm commands, you might not be able to do it directly through the GUI.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • 1
    You're right that change sets can only hold changes for one component. But the various UIs do allow you to commit to multiple components at once. With the Eclipse GUI, you can multiselect, or click the "Check In All Pending Changes" button. With the CLI you can either commit from the sandbox root, or specify multiple paths. – Erigami Jun 28 '11 at 20:46
  • @ehughes. Excellent, thank you for this precision. Do you know if the actions done through the GUI are actually CLI commands (logged somewhere)? Or are they direct call through some API? – VonC Jun 28 '11 at 21:04
  • 1
    No, the GUI does not run the CLI under the covers. They run directly through an internal API that the CLI also calls. – Erigami Jan 12 '12 at 20:56
  • @ehughes: Is that the OSLC Rest API? https://jazz.net/blog/index.php/2009/09/11/oslc-and-rational-team-concert/ (used behind the scene by the GUI or by the CLI) – VonC Jan 12 '12 at 21:01
  • No. It's a Java API that hasn't been exposed to external developers. To my knowledge, there isn't an external API (aside from the command line interface) for SCM operations. If you're feeling brave, you could look at the IFilesystemRestClient in the RTC source. But that's not supported. So caveat emptor. – Erigami Jan 12 '12 at 21:07
  • Actually, I remember finding a limitation that something cannot be done through CLI, even if the Eclipse plugin supports that. I can't recall what that exactly was. – Pavel May 11 '12 at 15:46