McHugh allowed solo homers to Paul Goldschmidt in the first and Jake Lamb in the ninth.
"I thought he was in complete control of the game, really from the onset," Astros manager A.J. Hinch said. "I thought it was good he got out of the gate hot. After the Goldschmidt homer, he settled in and got early-count outs and really did a good job of getting through the game. We needed him to go as long as he could today given our bullpen, the extra-inning game yesterday. Not only did he give us length, but he gave us quality and really was in control the whole game."
The Astros' bullpen has endured quite a workload in May because of a run of extra-inning games, including Sunday's 13-inning win in Anaheim. That was on the mind of McHugh, a 19-game winner a year ago who's 4-1 with a 3.80 ERA in his past seven outings.
"My whole goal was to keep the bullpen out of it," he said. "Keep guys from warming up. Keep guys from coming in. We were able to accomplish that today."
The D-backs are a free-swinging team, and they were aggressive early in counts, which played to McHugh's favor. He was able to use his cutter to keep them off the barrel of the bat, but he used all his pitches efficiently.
"He's using his four-seam fastball a little bit more, his changeup is now part of his arsenal, the curveball he can land at any time," Hinch said. "I think he's becoming more of a complete pitcher as a Major Leaguer after the 19-win season. I think at the beginning of the season, he was pitching a little tentative and a little careful, and he's made the adjustment to be the aggressor, and days like today happen."
Of course, the early run support helped. McHugh had a seven-run lead when he took the mound in the fourth inning and was more aggressive while working with catcher Jason Castro.
"Me and Jason kind of got together after we scored a few there and said, 'Hey, let's stay on top of them. Let's jump on them, stay on top of them and try to get the leadoff guy every inning,'" he said. "When you're able to do that, you can give yourself a couple quick innings here and there and find yourself out there in the ninth."
Brian McTaggart has covered the Astros since 2004, and for MLB.com since 2009. Follow @brianmctaggart on Twitter and listen to his podcast. This story was not subject to the approval of Major League Baseball or its clubs.