Cover is against Archery units. Your Swordsman is targeting a Maceman, which is a Melee unit.
Edit:
To clear up a little potential confusion...I assume you are attacking a city defended by Longbows and hence the question. Well the Civ4 combat system will always select the "best" defender in a stack to combat an attacking unit, so in the case of this Swordsman, it's picking the AI's mace since the native +50% in melee combat is making it a tougher opponent than a Longbow for that sword.
In fact, because Cover is on this sword, and would it give it an easier time against a Longbow, the promotion could have possibly taken any Longbows out of selection as a target for it, as the Mace is a harder fight for it to win. One of the little quirks that can pop up that can make you think twice about picking promos. City Raider III would be a better promo here in this case as it not only applies equally to all potential targets in the city, but it's actually stronger (-30% defense) than Cover or Shock (+25% combat ) in terms of power anyway and especially in cases where the defending unit has large modifiers -- such as units defending cities.