A federal appeals court sided with Republicans seeking to use district boundaries redrawn last year to give the G.O.P.

an advantage in the upcoming midterms.