ArcGIS for Desktop

  • Documentation
  • Pricing
  • Support

  • My Profile
  • Help
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS for Desktop

A complete professional GIS

ArcGIS for Server

GIS in your enterprise

ArcGIS for Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Pricing
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

Help

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • More...

Reconcile Versions

  • Summary
  • Usage
  • Syntax
  • Code sample
  • Environments
  • Licensing information

Summary

Reconciles a version or multiple versions against a target version.

Usage

  • The reconcile process requires that you are the only user currently editing the version and the only user able to edit the version throughout the reconcile process until you save or post.

  • The reconcile process requires that you have full permissions to all the feature classes that have been modified in the version being edited.

  • Versioning tools only work with Enterprise (ArcSDE) Geodatabases. File and Personal geodatabases don't support versioning.

  • The geodatabase is designed to efficiently manage and support long transactions using versions.

  • The reconcile process detects differences between the edit version and the target version and flags these differences as conflicts. If conflicts exist, they should be resolved.

  • After running the reconcile process successfully with the 'ALL_VERSIONS' option all vesions in the geodatabase will appear the same.

Syntax

ReconcileVersions_management (input_database, reconcile_mode, {target_version}, {edit_versions}, {acquire_locks}, {abort_if_conflicts}, {conflict_definition}, {conflict_resolution}, {with_post}, {with_delete}, {out_log})
ParameterExplanationData Type
input_database

The enterprise geodatabase that contains the versions to be reconciled. The default is to use the workspace defined in the environment.

Workspace
reconcile_mode

Determines which versions will be reconciled when the tool is executed.

  • ALL_VERSIONS —Reconciles edit versions with the target version. This is the default.
  • BLOCKING_VERSIONS —Reconciles versions that are blocking the target version from compressing. This option uses the recommended reconcile order.
String
target_version
(Optional)

Name of any version in the direct ancestry of the an edit version, such as the parent version or the default version.

Typically contains edits from other versions that the user performing the reconcile would like to pull into their edit version.

String
edit_versions
[edit_versions,...]
(Optional)

Name of the edit version or versions to be reconciled with the selected target version. This can be an individual version name or a Python list of version names.

String
acquire_locks
(Optional)

Determines whether feature locks will be acquired.

  • LOCK_ACQUIRED —Acquires locks during the reconcile process. This should be used when the intention is to post edits. It ensures that the target version is not modified in the time between the reconcile and post operations. This is the default.
  • NO_LOCK_ACQUIRED —No locks are acquired during the reconcile process. This allows multiple users to reconcile in parallel. It should be used when the edit version will not be posted to the target version because there is a possibility that the target version could be modified in the time between the reconcile and post operations.
Boolean
abort_if_conflicts
(Optional)

Determines if the reconcile process should be aborted if conflicts are found between the target version and the edit version.

  • NO_ABORT —Does not abort the reconcile if conflicts are found. This is the default.
  • ABORT_CONFLICTS —Aborts the reconcile if conflicts are found.
Boolean
conflict_definition
(Optional)

Describes the conditions required for a conflict to occur:

  • BY_OBJECT —Any changes to the same row or feature in the parent and child versions will conflict during reconcile. This is the default.
  • BY_ATTRIBUTE —Only changes to the same attribute (column) of the same row or feature in the parent and child versions will be flagged as a conflict during reconcile. Changes to different attributes will not be considered a conflict during reconcile.
String
conflict_resolution
(Optional)

Describes the behavior if a conflict is detected:

  • FAVOR_TARGET_VERSION —For all conflicts, resolves in favor of the target version. This is the default.
  • FAVOR_EDIT_VERSION —For all conflicts, resolves in favor of the edit version.
String
with_post
(Optional)

Posts the current edit session to the reconciled target version.

  • NO_POST —Current edit version will not be posted to the target version after the reconcile. This is the default.
  • POST —Current edit version will be posted to the target version after the reconcile.
Boolean
with_delete
(Optional)
  • DELETE_VERSION —Current edit version that was reconciled will be deleted after being posted to the target version.
  • KEEP_VERSION —Current edit version that was reconciled will not be deleted. This is the default.
Boolean
out_log
(Optional)

Specify a name and location to where the log file will be written. The log file is an ASCII file containing the contents of the geoprocessing messages.

File

Code sample

ReconcileVersions example (stand-alone script):

The following stand-alone script demonstrates how to use the ReconcileVersions tool to reconcile all versions owned by the user specified in the SDE connection file.

# Name: ReconcileVersions.py
# Description: Reconciles all versions owned by a user with SDE.Default

# Import system modules
import arcpy, os

# Set workspace
workspace = 'C:/Data/connections/bender@production.sde'

# Set the workspace environment
arcpy.env.workspace = workspace

# Use a list comprehension to get a list of version names where the owner
# is the current user and make sure sde.default is not selected.
verList = [ver.name for ver in arcpy.da.ListVersions() if ver.isOwner
           == True and ver.name.lower() != 'sde.default']

arcpy.ReconcileVersions_management(workspace,
                                   "ALL_VERSIONS",
                                   "SDE.Default",
                                   verList,
                                   "LOCK_ACQUIRED",
                                   "NO_ABORT",
                                   "BY_OBJECT",
                                   "FAVOR_TARGET_VERSION",
                                   "NO_POST",
                                   "KEEP_VERSION",
                                   "c:\RecLog.txt")
print('Reconciling Complete')

Environments

  • Current Workspace

Licensing information

  • ArcGIS for Desktop Basic: No
  • ArcGIS for Desktop Standard: Yes
  • ArcGIS for Desktop Advanced: Yes

Related topics

  • An overview of the Versions toolset
  • An overview of versioning
  • The version editing process
  • A quick tour of reviewing conflicts
  • What is a version?
  • Version scenarios

ArcGIS for Desktop

  • Home
  • Documentation
  • Pricing
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Insiders Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Privacy | Legal