This guy was my partner just a minute ago, and he's already switched sides, damn it.
Literal
This-guy, just-now until my partner [copula-だったのに], already defected [derogatory-やがった].
寝返りやがった — 寝返り 'to turn over in sleep / to defect/betray' combined with ~やがる, the derogatory auxiliary that marks contempt for the subject's action ('the bastard went and...'). ~のに here is the concessive 'even though / despite that.' さっきまで 'until just now' sets up the betrayal's recency. Raw, angry masculine speech.