Ghandi's revolution succeeded through mass noncompliance.
Nonviolence was a luxury Ghandi could afford during the revolution because Indians outnumbered British soldiers by something like 20k to 1. There was no world where the recently weakened UK (after WW2) could hold India once it decided to become independent.
The article I posted above gets into this, but it was not. The British did not quit India because some guy went on a hunger strike, and they actively propagate pacifist myths like his because they are completely unthreatening.