Turkey tells EU to refrain from repeating past mistakes