KM's point about the Republican navy's valid but they were bitterly divided.
IF they could've gotten it together and massacred the Moorish legion's transports, the Civil War becomes a damp squib. Germans and Italians get spanked badly enough for foreign adventures to seem less profitable.
Germany and Italy being fully at war with Republican Spain might get the LoN off their duffs and some actual plans and coordination to restrain German and Italian ambitions. The French and British not restraining the Republic to arm itself properly in response would do some to improve their capabilities.
YMMDV. Uncle Joe's dearest hope from 1936-1939, was that the democracies would quit implicitly backing Hitler's anti-Soviet crusade.
Bumping jsb's point- the anticlerical campaigns by the anarchists and communsts were a major factor in losing CEDA support for the Republic and any support by the major democracies (US, UK, France).
This means butterflying that campaign keeps loyal lot of the Spanish army NCO's and officers that went Nationalist mostly b/c of that chaos.
The Republic started off screwed w/ 80% of their officer and NCO cadre went over to the Nationalists leaving the herd of militias headed by some rather uninspired generals and having to rebuild the guts of a military from scratch.
As to arming the workers, you've got a point, especially in Andalucia.
The Guardia Civil managed to keep the socialists and anarchist militias in check so when the Moorish legion made landfall, it was a runaway slaughter.
Butterfly the GC being "neutral" or pro-Nationalist and the Andalucian campaign's much different.
I'm with KM- Leon Blum could have been more forceful in backing the Republic. As tough as it is for a Yank like myself to see France as the best hope for the Spanish Republic, from a logistical and political POV they are in the SCW.
If the French get involved and blockade Portugal, the Germans and Italians are SOL. No fuel, spares, ammo, or reinforcements, and it becomes grim real fast.
The Communists had the right idea of a centralized command and consistent supply/training/C3I structure but they were on a shoestring of supplies and having to start almost from scratch with a group unprepapred to fight the Spanish-American War much less deal with the blitzkrieg.
Most volunteers in the Int'l brigades were Great War veterans or had some military or paramilitary training so they'd theoretically be great cadre for the Spanish militias to learn "proper" soldiering or at least central commands, unlike the militiamen used to taking autonomous action.
As you mentioned, it became a major bone of contention within the Republic that all those Soviet tanks, planes and heavy weaponry went to "reliable" Communist units like the IB"s and Assault Guards instead of Spanish Army units.
Militias esp POUM, CNT/FAI saw the handwriting on the wall and bitterly resisted that centralizing push. Politically they were right, but from a military effectiveness POV or even preventing Nationalist victory POV, it was disastrous for the Republic.