Wiki and Contemplator put the song together with "The Gypsy Laddie," "Black Jack Davy," etc., but I like the idea of treating it separately. The 'w' is left off the 'wraggle' in some versions.
Apparently variants date back to the 18th C., but I haven't studied the song.