Just as a little aside, has anyone ever noticed that the entire notion of upgrading units came out of Leo's Workshop, and was adopted in civ3 as a way for every civ without Leo's to have a way to gain more military power via gold rather than buildng new units from scratch? I actually think the upgrading idea is pretty unrealistic, as Leo's was originally meant to model the idea that a civ who nurtured a Leonardo Da Vinci was so full of inventiveness and creative industry that they would be fielding the cutting edge stuff due to technological genius and industry, rather than because they had fat coffers full of gold.
I would prefer instead a retraining option, where you have to order units to retrain in a city with the necessary facility, a barracks, military academy, whatever. In order to refit the men with new equipment, a turn's worth of production from the city, or the amount of shields necessary to make up the cost difference between old and new, whichever is greater, must be applied to retraining. The retraining unit assumes new graphics and cannot engage in combat while retraining. Retraining takes 5 turns, and then the unit assumes its new graphical form and is ready for deployment. A city may retrain only one unit at a time. This would allow for the kind of flexibility you want, the men could be retrained from spearmen to pikemen, MI, Knights (maybe extra gold cost for acquiring horses), or whatever you desired.