Preheat the oven to 200°C. Cook the potatoes in a large saucepan of lightly salted boiling water for 5 minutes, or until just tender. Drain and set aside.
Heat the oil in a deep frying pan and gently cook the onions over a moderately low heat for 5–10 minutes until light golden, stirring all the time.
Add the stock or wine, tomatoes, sugar and nutmeg to the onions. Season lightly with salt and pepper, mix well, then cook gently, uncovered, for 15 minutes, stirring from time to time, until the sauce thickens. Stir in the parsley and taste to check the seasoning.
Make a layer with half the potatoes in a 2 litre baking dish (or four individual ovenproof dishes), cover with half the tomato and onion sauce, then scatter over most of the olives, reserving a few for garnishing. Repeat with a second layer of potatoes and tomato sauce.
Sprinkle the breadcrumbs over the top, then bake for 30 minutes until golden and crispy. Pile the reserved olives in the centre of the moussaka, sprinkle with parsley and garnish with a sprig of fresh rosemary.