Child 204.
This version is based quite closely on June Tabor’s version (retitled “Waly Waly”) on the album Airs and Graces. She did quite a lot of work on Child’s original, piecing together a version that works well from four or five of Child’s variants. I’ve made a couple more changes, pulling in two “Farewell” verses and dropping one of the floating “heartbreak and regret” verses, but by and large this is June Tabor’s Jamie Douglas.
I’m eternally wary of claimed factual origins for ballads, but it does appear that there was a historical Jamie Douglas who did send his wife back to her father as damaged goods. Beyond that, who knows?