Andrew Abbott and four relievers pitched well in beating Giants to snap eight-game losing streak, longest in two years.