Ideology and the revolutionary process: two socialist case studies