Mayors and public advocates have been pressuring investment firms to divest public pensions from gun companies.