Yes, it's in my edition of Whall, but pretty obviously an art song and unlikely to be any earlier than the late 19th century. Baring Gould and Fleetwood Sheppard gave it in 1894 in 'A Garland of Country Song' at p.49. Baring Gould states 'We give this sailor song with some hesitation. In the first place because the melody is without originality and in the second place because we do not believe that it is a folk song proceeding from the sailors themselves. Whatever was its origin, and poor as the air may be, it has, however, been accepted by the sailors, and few -- certainly no Devonshire sailors will be found who do not know and enjoy it.'
They first had the tune from a bandmaster of the Royal Marines and then a Lieutenant gave him the words. I have not seen it on any broadsides. Terry included it in his 'Salt Sea Ballads' 1931. He states: 'L. A. Smith (of Newcastle) prints the words as they were sung in Northumberland. Other versions of them appear in Firth and elsewhere. I learnt the tune from Mr. James Runciman; it was printed in Sharp's A Book of British Song, in 1902.'
I must add that Terry's text is pretty much the same as that in Garland.