Gov. Jerry Brown found himself caught in no man’s land when it came to deploying the California National Guard to make President Trump happy. He still managed to come out a winner.

Brown knew he had no choice but to go along with Trump’s request to call out the Guard, even though the waves of illegal immigrants that the president cited as a reason exist mainly in his head. Trump held the ultimate weapon — he could federalize the state Guard, removing it from Brown’s control. It would be a drastic step, but it’s easy to imagine Trump doing it.

But Brown was not about to just say yes and spend his final months in office being hounded by sanctuary protesters every time he showed his face in public.

So he did what he always does: He gave each side a little bit, without actually giving either one the win.

In this case, he agreed to deploy Guard troops, but only on the condition that they not participate in any immigration law enforcement. Drugs, guns, human trafficking — that’s what the Guard will be looking for.

At first it looked like it might backfire, as Trump tweeted his thanks to “Jerry” for “doing the right thing.” Effusive praise wasn’t exactly what Brown had in mind.

Fortunately, it dawned on Trump over the next few days what the governor had actually agreed to. By last week the president was back to his usual insulting self — which Brown doubtless welcomed — even as his administration worked with the state to make the California Guard deployment happen.

This is why Brown has lasted so long in politics and done so well. He can say “yes” and “no,” all in the same sentence.

Senator shines: State Sen. Scott Wiener’s bill to increase housing density along transit corridors didn’t survive its first first legislative hearing, but even in defeat it elevated Wiener’s stature.

Wiener proposed that buildings of up to five stories be allowed to go in along busy transit corridors, as long as they had the required amount of affordable units and met local rules — except the ones that would limit their height.

Local governments came out in force, saying they’d lose control over what gets built in their own communities. Unions opposed it because it would take away their ability to use their political pull as a hammer on developers.

Even some housing advocates came out against it because it would limit their ability to squeeze developers for money.

The left opposed it because progressives’ commitment to the endless process of how to plan and build anything is greater than their commitment to housing. The right fought it because conservatives basically don’t want poor people moving in next door.

Wiener’s willingness to take on all these entrenched interests with a serious proposal about a serious problem drew national attention, elevating him above the rest of the pack in Sacramento.

Movie time: “Rampage.” This latest Hollywood blockbuster starring Dwayne “the Rock” Johnson features a cast of animals turned into behemoths by a genetic experiment gone wrong. It’s up to the Rock, playing a supersmart scientist, to make things right.

Park your brain at the door, grab some popcorn, and see why the Rock is one of the highest-paid movie stars in the world.

Lotta laughs: The Lotta’s Fountain earthquake ceremony was a big hit. Even as the survivors of the 1906 disaster have passed into history, the event continues to thrive, with period costumes all around.

And, yes, it’s still Lotta’s Fountain. I took a lot of heat for suggesting in this column that it be renamed after the late Mayor Ed Lee, with one spectator asking me flat out how I could “even think of renaming Lotta’s Fountain.”

“Do you even know who Lotta was or what she did for the city?” I asked.

“No,” he replied. “But I knew Ed Lee, and what he did to the city.”

And with that he turned and walked away.

Rolling on: I can’t help but laugh over the fight between San Francisco and its invading army of scooters.

The city can huff and puff that they’re a nuisance, just like it did with Uber and Lyft. We all know who won that one, and why — too many people saw them as a huge improvement.

As for police keeping them off the sidewalk?

The other day, two of them whizzed by as I was talking to a couple of cops on foot patrol.

“Are you guys doing anything about this?” I asked.

“No, but you’re welcome to make a citizen’s arrest. If you can catch ’em.”

Oops. Gotta run. Catch you next week.

Want to sound off? Email: wbrown@sfchronicle.com