Depends on your vehicle, if it is an older style diesel, you may get away with brimming it with diesel, might be worth putting a diesel treatment through too. If it is one of the newer high pressure common rail style diesel engines Ford TDCi etc), these operate on very tight tolerances and have tiny rubber seals which are susceptible to the corrosive effects of petrol. DO NOT run the engine, drain & flush any contaminated components. A very expensive rebuild could result if you don't!
Graeme, November 2013