I wrote this song to include it in my book 101 + 5 Folk Songs for Camp in 1966. It's origins were a folk story from Bill Bonyon as I remember.
The verse tune is borrowed from Tyeing Ten Knots in the Devils Tale and the chorus tune is the chorus of Camptown Races.
www.ecopsych.com/mjcfolk.html