Hungary is opposing a EU proposal to cut Russian oil imports by the end of this year. Their government said that doing so would "ruin the Hungarian economy". I see that they import some 60% of their oil from Russia, but it's not too clear to me what, besides the present $35/barrel discount that Russian oil seem to presently enjoy is stopping Hungary from importing from elsewhere. Basically, is this just a price issue?
All the refineries in Hungary (and in Slovakia) are calibrated to the Ural type of oil coming from Russia. This type is different from the Brent type of oil coming from North Sea, etc.
Adjusting the refineries to Brent oil, or building a new refinery, would take at least a few years and about 700-1000 million dollars according to experts.
Ruin is relative. Hungarians would certainly take an economic hit. If you look at the oil pipelines in Europe, you can see that they are by and large going east to west, not north to south or south to north (there is a pipeline from the Med to Hungary, however). Replacing pipelines by trucks from distant ports will be expensive, and it will require trucks which might not be immediately available.
Hungary would have to balance the cost of a boycott with the cost of the pandemic, the cost of climate change, and other priorities.