Copy Builds and BuildDefinition via api, question. RESOLVED
![]()
Unfortunately I am working on a copyproject function. one element is the build engines and builds.
I now can loop thru the data on the source server, and am starting to replicate the data (which there appears to be a LOT of).
Buildengine has a copyEngine() and BuildDef has a copyDefintion() functions. These appear to be deep copy, but of course embedded handles are copied intact. those handles of course are useless on the new repository.
Is there any documented tree of the objects down from build engine, that shows (object) handle relationships?
(that I can look at?)
oh, and I want to say, there is a very dangerous issue with adding a Builddef to a build engine supported list.
assuming that the list<> object is persistent outside the object is really nasty. (not to mention hard to learn)
buildEngine_new.getSupportedBuildDefinitions().add(bd_new);
one is depending that the value returned by getSupportedBuildDefinitions() is passed by reference and not by value.
this should have been encapsulated in the BuildEngine object with an addSupportedBuildDef(bd) method.
(and this design should be consistent across all the objects.. matching get/set methods).
|
Accepted answer
One other answer
![]()
can someone mark this resolved.. accept my answer with the code sample..
thx
|
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.