So far the virus is believed to have a two week incubation period with unknown transmissability during that time, which makes it particularly hard to contain, especially with a migration like Chinese New Year.
The lockdown is unprecedented in China but the Soviet Union used to do similar lockdowns (at a smaller scale) during cholera outbreaks. I think this is just a massive overcorrection due to China's 2003 SARS outbreak but we'll start seeing more and more of these large scale quarantines as our civilization comes to terms with the realities of cheap air travel.