Why are they are taking a hardline? Here in Canada and in the UK both didn't want Scotland or Quebec to leave, but neither government used such heavy hand to prevent them from holding referendums. All Spain had to promise is if Catalonia left Spain would veto it's entry to the EU and even many Catalan nationalists would probably find that too much to stomach as I don't think any contemplated the idea of an independent Catalonia outside of the EU, it was always an independent Catalonia as a member of the EU.
Canada and the UK don't have the ruling party be a bunch of Francoists. When Al Qaeda attacked in 2004, they blamed another separatist group, the Basques.