fix race condition when quitting: increment revision
fix race condition when quitting: increment revision

(Also refactor so that the variable assignment is shared.

elidupree/Lasercake,elidupree/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,Lasercake/Lasercake,idupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,Lasercake/Lasercake,elidupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,idupree/Lasercake,idupree/Lasercake,elidupree/Lasercake,idupree/Lasercake