It's only your right until the next referendum to ban guns in SF, then you're in legal limbo until the state supreme court strikes it down. Rinse, wash, repeat every few years.
As for carrying in SF, only people named Feinstein are permitted to do that.