The left-hander struck out All-Star Paul Goldschmidt with the bases loaded to end the third inning with his team up 2-0. However, Arizona tied it in the third, before going ahead two innings later. After Pittsburgh tied it in the sixth, things unraveled for Locke in the bottom of the inning.
"When I went back out for the sixth inning I just felt fatigued and just tried to make pitches," Locke said. "Fighting myself a little bit, leaving the ball elevated and elevating change-ups. That is something I am not accustomed to doing very often. When that ball starts getting up, even I start asking questions."
Locke (2-3) left after giving up Hill's homer, allowing six runs — four earned — and nine hits in 5 1-3 innings.
Marte, who hadn't homered in almost four years and had been out of the majors since then, was called up from Triple-A Reno earlier on in the day to help fill the roster spots vacated by the trades of Gerardo Parra and Martin Prado.
"It feels great to be back," Marte said. "I worked really hard to try to prove that I could still play here.'"
Neil Walker's 16th home run of the season tied the score 3-3 earlier in the inning and chased Diamondbacks starter Josh Collmenter.
The Pirates took the lead in the second inning when Russell Martin hit a two-run double.
Collmenter played a part in allowing the Diamondbacks to tie the score after Locke had shut them out for three innings. With the bases loaded and two out, Collmenter hit a bouncer to third baseman Pedro Alvarez, who charged the ball, scooped it and pumped once before throwing to first base.
""He has played a lot of first base," Pirates manager Clint Hurdle said of Davis. "He has caught that one before. He didn't catch that one (Thursday). Nobody felt worse about it than he did."
Andrew McCutchen drove in Gregory Polanco with a single in the seventh to pull the Pirates to 6-4, but they couldn't rally against relievers Brad Ziegler and Addison Reed, who pitched a scoreless ninth for his 27th save.
LOCKED IN, FOR THE MOMENT
When Locke fanned Goldschmidt in the third, he felt fortunate to escape the jam. Especially after Collmenter had reached with two out and Hill walked to load the bases. "It definitely wasn't the plan to put Hill on to get to Goldschmidt, but he just missed it," Locke said. "It was more like I got away with one than he did anything."
Diamondbacks: Left-hander Vidal Nuno (0-2) starts the second game of the four-game series Friday. Nuno will be making his fifth start of the season and has a 3.47 earned-run average. It will be his second career start against Pittsburgh.
Pirates: Right-hander Edinson Volquez (8-7) makes his 21st start of the season. He is 3-0 in his last four road starts with a 2.05 ERA and has won four of his last five decisions.
Diamondbacks: Shortstop Chris Owings is getting close to swinging a bat and is taking ground balls. Manager Kirk Gibson said. Owings has been on the disabled list since June 29 with a left shoulder strain.
Pirates: OF Starling Marte was eligible to come off the seven-day concussion disabled list on Wednesday but has not been activated.