0

In ArcGIS documentation, I cannot find any references to cloning a transactional version. Is there a built in method for it?

I think I know how to do it manually in Arcpy, basically creating a new state branching from a parent and copying all the deltas with the given state (clone source) to the new state (clone) and of course adding the new state to the version tree under the parent, but I am wondering if there is a more neat way of doing it.

Update: Lets put it in more abstract way: Assume version hierarchy like A->B, A->C and C->D. i.e. B and C are decedents of A and D is decedent of C. The objective is to get an independent copy of C and call it E, while keeping the proper hierarchy. That is, after cloning, we will have A->E and E will contain exactly all the changes in C. Note that, creating a version off of C will not cut it b/c if C changes, those changes will be reflected in E, which we do not want. Also, taking a branch off of A will not work since it does not have what is in C. Of course, we do not want to reconcile C into A and then get a version off of A - that is against the whole goal of having all these versions around.

3

Yes there is a 'neat way' of doing it, and I believe all of the APIs are present in order to do this in automation. However, to test the process, I performed a version copy by-hand as follows:

  1. Inside ArcMap, create a new EDIT version and switch to it to make it current. (I'm using ArcGIS for Desktop Version 10.2.2.3557 for reference.)

  2. Reconcile this new EDIT version with the TARGET version you want to copy. During the reconcile, specify that the TARGET version changes should take precedence for any/all conflicts.

  3. Verify that the EDIT version contains differences against DEFAULT by using the Version Changes tool enter image description here . Also check that the EDIT version contains NO differences compared against the TARGET version which was the copy source.

Using the API, you want the Reconcile Versions (Data Management) tool. It requires a connection string to the geodatabase, then original (TARGET) version, and the new (EDIT) version.

Be sure to assign the following parameters as well:

  • Reconcile Mode: ALL_VERSIONS
  • Conflict Detection: BY_OBJECT /because it is faster/
  • Conflict Resolution: FAVOR_TARGET_VERSION

Bottom line: reconciling with a target version means bringing those changes into a current version....when you start with a fresh edit version and immediately reconcile with a target, the result is a version copy of the target.

UPDATE: Comments below are supplemented by this image which shows the net effect of a new version+reconcile against various targets.

  • Thanks! I am not sure if this answers my question. See the updated question. – Mahdi Jan 13 '15 at 17:59
  • Based on the updated question:, the execution sequence for an E version equal to a C but decedent from A is as follows: 1)create a new version from A named E; 2)reconcile E using target C. If you want an a version which replicates D from C from A: first create E from A, then reconcile E using target D. The Pattern: New Version at the graft point on the version tree then reconcile using the target version of interest. – JasonInVegas Jan 13 '15 at 19:12
  • Lastly, instead of simply refuting the answer because it is not immediately obvious that the state tree will respond as desired, try setting up some small unit tests with single feature edits that differ in A, B, C, and D from C. Then create E from A, apply different reconciliations, and observe/validate the results in E. You'll be pleased. – JasonInVegas Jan 13 '15 at 19:20
  • Thanks! Just to add here CreateVersion_management can be used to create the target version in the proper place in the version tree. – Mahdi Jan 14 '15 at 19:11
  • I can only reconcile from a child to its parent. Any attempt to reconcile to something else in arcpy command returns no result and in GUI does not allow me to pick another child version. Am I missing something? – Mahdi Jan 14 '15 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.