I am trying to reconcile and post the edits. I would like to know if I can post the versions to two different parents. Could some one help me with c# coding on how to do this.
2 Answers
I don't think you can directly rec&post directly to both parents.
In ArcMap, you get this error:
But you can rec&post to a common ancestor version (grandparent, great-grandparent, etc), and then reconcile down the branch of the second parent that you want to post to.
You can rec&post with the IVersionEdit interfaces in ArcObjects http://help.arcgis.com/en/sdk/10.0/arcobjects_net/componenthelp/index.html#//002500000m0v000000
bool reconcileresult = version.Reconcile4(
parentVersionName, // targetVersion
true, //acquire lock
true, // abort if conflict
false, //child doesn't win
columnLevelConflict); //use column-level conflicts
if (!reconcileresult)
{
version.Post(ArcMap.Editor.EditWorkspace.GetParentVersionName());
}
As I know, you can't post two parent version if they're in 2 different state tree. Let me example this, let's say there is a Default version and child under Default, and grandchildren under children... So the littlest child can post all edits to child then child will reconcile/post to Default.
But what if there would be another tree? Just like them. So the child under 2. tree can't reconcile/post to another child/parent which are under 1. tree.
I hope I understood correctly your question.