Bring the red wine to a boil with thyme and parsley and bay leaves, then leave to cool for 1 hour. Pour the wine marinade over the jointed chicken and marinate 12 hours.
Preheat the oven to 300 degrees F.
Fry the bacon and remove with a slotted spoon. Add the oil to the pan and fry the onions until softened. Remove the chicken from the marinade and pat dry. Dust the chicken with flour then add to the pan and fry lightly to brown. Pour in the warmed brandy and flambe it. Transfer chicken and liquid to a casserole and add bacon, marinade, garlic and mushrooms. Cover and cook the oven for about 1 hour.
In the meantime, fry the pearl onions in butter with the sugar and a little water until glazed. Add to the casserole and cook for a further 30 minutes. If the sauce needs thickening, stir in a few small knobs of buerre manie. Remove casserole from the oven and sprinkle the chopped parsley over before serving.