Complex sentence: This was part of the Russo-Polish war, and ended up with gains for Poland after the treaty of Riga in 1921, but with nothing for the Ukrainians who were fully defeated.
Split into simpler sentences: This was part of the Russo-Polish war. And ended up with gains for Poland after the treaty of Riga in 1921, but with nothing for the Ukrainians who were fully defeated.