# Get a list of all the datasets. # First, get all the stand alone tables, feature classes and rasters. dataList = arcpy.ListFeatureClasses() + arcpy.ListRasters() # Next, for feature datasets get all of the featureclasses # from the list and add them to the master list. for dataset in arcpy.ListDatasets(): print "Adding:", arcpy.ListFeatureClasses(feature_dataset=dataset) dataList += arcpy.ListFeatureClasses(feature_dataset=dataset) # Execute the ReconcileVersions tool. arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.Default",verList,"NO_LOCK_ACQUIRED","NO_ABORT","BY_ATTRIBUTE","FAVOR_TARGET_VERSION","NO_POST","KEEP_VERSION")
Solved! Go to Solution.
for version in verList: print version arcpy.ReconcileVersions_management(workspace,"ALL_VERSIONS","SDE.Default",version,"NO_LOCK_ACQUIRED","NO_ABORT","BY_ATTRIBUTE","FAVOR_TARGET_VERSION","NO_POST","KEEP_VERSION")
for dataset in arcpy.ListDatasets():section. I even input some lines to skip the mosaic datasets, but it never reached them, i.e.
for dataset in arcpy.ListDatasets(): print "Adding:", arcpy.ListFeatureClasses(feature_dataset=dataset) if dataset == "u'bc.GIS_ADMIN.SWOOP2010'" or dataset == "u'bc.GIS_ADMIN.SWOOP2006'": print "skipping SWOOP2010 and SWOOP2006" else: dataList += arcpy.ListFeatureClasses(feature_dataset=dataset)