Yea, Swans are grade-A jerks. You gotta put them in their place and stand your ground! Ideally you'd want a spade or kukri*. The last swan that attacked me got sent to heaven with a spade's edge to the neck. Spades are nice but you cant always carry one with you. That being said, you can always carry one of these with you so long as you don't have criminal intent;
* - A Kukri as it's called, is like of like an all purpose cutting tool from Nepal. It's a combination of an axe and dagger. I like to keep one handy with me when I go Geocaching because they are so handy, like a multitool. I haven't had the liberty to fend off a swan with it, but I am confident it'd work fine.
If all else fails go for their necks; Grab, squeeze, and twist.