Suppose that we have (not necessarily injective) group homomorphisms $H \to G_1$ and $H \to G_2$, and we construct the pushout $G_1 \sqcup_H G_2$. Suppose we have a representation $V$ of the pushout group $G_1 \sqcup_H G_2$. We can of course restrict the representation along the maps in the pushout square (I'll just denote these by $V$ as well). In this case, can we obtain some relationship between the group cohomology groups $\mathrm{H}^\bullet(H;V)$, $\mathrm{H}^\bullet(G_i;V)$, and $\mathrm{H}^\bullet(G_1 \sqcup_H G_2;V)$, perhaps using a long exact sequence?
(In case it matters, for my purposes $V$ will be a finite-dimensional real vector space.)