It's all about the answers!

Ask a question

how to accept changes to a single component only


Luk Stephenson (51111) | asked Apr 29 '10, 9:32 a.m.
Hello,

I'm getting an exception when using the SourceControlUtility API. I've done some reading on the forums and have seen that this can occur if a workspace has two components which both have. When I created my repository worksapce, it only had a single component. However after calling SourceControlUtility.acceptAllIncoming I find it has all components from the flow target.

How can I accept all changes for only 1 component (or a specific list of components)? If this isn't possible, how can I check out only one component. SourceControlUtility doesn't seem to provide this.

I've included the error that this problem manifests as for me.

com.ibm.team.build.internal.scm.SourceControlUtility$2: Status WARNING: com.ibm.team.filesystem.client code=2 Loading the directories in the file system would overwrite/remove existing directories. null children=
at com.ibm.team.build.internal.scm.SourceControlUtility.updateFileCopyArea(SourceControlUtility.java:371)

Thanks

Luke

2 answers



permanent link
Luk Stephenson (51111) | answered Apr 29 '10, 9:39 a.m.
I just discovered that I can configure against the flow target which components are included in the flow.

I'm still interested to know how I could programmatically accept / checkout only a single component from a multi component workspace.

Thanks

permanent link
Nick Edgar (6.5k711) | answered Apr 30 '10, 10:05 a.m.
JAZZ DEVELOPER
Note that SourceControlUtility is not API, it's an internal class use by JBE and the Ant tasks to interface with Jazz SCM. Using scoped flows, as you discovered, is the easiest way to avoid collisions between components in multiple flow targets. SourceControlUtility just accepts everything from all flow targets (honouring the scopes). If you need more control, you'll need to use the SCM and Filesystem APIs directly, which you can see how to use in the source code for SourceControlUtility.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.