D.C. Mayor Marion Barry yesterday pledged $250,000 for emergency repairs to the downtown shelter for the homeless operated by the Community for Creative Non-Violence and said the city will start patrolling the streets in cold weather to look for persons who might be in danger of freezing to death.

The mayor stopped short of giving police the authority to take homeless people to shelters forcibly if they refuse to come in from the cold. But he said the city will start handing out surplus Army blankets, field jackets, boots and gloves to those who don't want to go to the CCNV shelter at 425 Second St. NW or city-run facilities.

Barry announced the emergency assistance to the controversial CCNV shelter during an afternoon tour of the dilapidated building. He said President Reagan's recent rejection of plans to evict hundreds of the shelter's residents forcibly had convinced him it would be worthwhile to spend the money.

The Department of Health and Human Services had decided to close the facility, calling it a safety hazard, after long and bitter negotiations with CCNV over how the federally owned building would be renovated as a model shelter. A substitute temporary shelter in Anacostia was opened with HHS funding, and government officials said they planned to evict residents of the Second Street shelter until the White House announced Dec. 28 that Reagan had rejected the plan.

"Now that it's going to be open for a while, the city is prepared to spend significant amounts to bring the facility to minimum fire and safety code standards," Barry said.

The city funds will be spent to "winterize" the three-story building and to make badly needed plumbing and roof repairs. Barry said some of the city's labor unions have volunteered their help.

"This is no permanent solution to the problem of the homeless," said Barry, who toured the shelter with D.C. Del. Walter Fauntroy and several city and labor union officials. "But it's better to be in this huge facility, as awful as it may seem, than to be out on the streets."

Barry refused to be drawn into the long dispute between CCNV director Mitch Snyder and federal officials over a pledge by Reagan to turn the shelter into a model facility. Reagan made the pledge two days before the 1984 election in response to a 51-day hunger strike by Snyder.

Yesterday, the mayor threw an affectionate arm around Snyder as the two men greeted each other on the steps of the shelter and took a 20-minute tour of the facility.

Barry said he still thinks it is the federal government's responsibility to fix up the shelter or to make other provisions for the hundreds of homeless men and women in the nation's capital. However, the arrival of cold weather and the deaths of eight homeless persons since November, apparently from exposure, have focused increased attention on the problem of the District's homeless.

The city's action, along with Reagan's decision not to evict the shel-ter's residents, offered at least a temporary reprieve for Snyder and other CCNV activists, who have operated the shelter for nearly two years. After two weeks of expecting a federal raid any day, Snyder spent yesterday mapping out needed repairs and putting in a bid to the mayor for a washing machine and blankets for the residents.

"I believe God wants this building to be here for this purpose and that nothing can make it go away," said Snyder. "When we get to spring, we'll have to see where we go from here, but I'm convinced that one day this will be a model facility."

City officials said their talks with the Reagan administration indicate that the shelter will be allowed to operate during the winter at least.

Barry, noting the city already spends more than $9 million on programs for the homeless, said patrols to find those in need of shelter will begin whenever freezing temperatures are forecast. On those nights, he said, police will work with the city's Crisis Resolution Unit to determine who needs and will accept shelter.

Those judged "mentally capable" to decide for themselves will be given blankets and warmer clothing if they elect to stay outdoors. Those who appear to be mentally incompetent will be taken to D.C. General Hospital where a mental health expert will decide whether to release them back on the streets or commit them for 48 hours.

Barry said he opposes the New York City practice of authorizing police to remove the homeless from city streets in cold weather and force them into shelters.

"We're going to try to persuade them to come in . . . [but] that's the life style they have adopted," he said. "That's not my life style."