I suspect the bawdy version will be found in notes, etc. from WW1 sailors and soldiers. My father picked up the dirty version while in Cavalry school, Ft. Riley, ca. 1920.
British versions are much older. Home, Dearie, Home (Amble Town) was published in 1888, but was old then.