I'm using Arc GIS 10.2.1. I have an mxd with several layers that come from a versioned feature class in SDE. I want to change the version that these layers point to. I can use the following code to get the version, but I don't know how to change it. Can I do this using arcpy?
MXD = arcpy.mapping.MapDocument("C:\temp\Test.mxd")
for lyr in arcpy.mapping.ListLayers(MXD):
if 'Version' in layer.serviceProperties.keys():
version = layer.serviceProperties['Version']