(I've just lost a post on this - Mudcat ceased responding on submit so I'm doing this via Ip..99 - which I'll now try to recreate).
My copy of the Roud Index has 106 entries for this song, many of them recordings of oral sources.
Child's text came from various editions of Herd's Ancient and Modern Scots Songs (stanzas 1,4,6,7 from 1769, others from later additions, complete in 1776). Child refers to several reprints of this in later collections. He also refers to a version in Chappell (which is different - not from Herd) and in Graves Irish Songs and Ballads.
The following early sources are listed in Roud, but it is not clear whether they are reprints from Herd or different versions: Gilchrist, Scottish Songs Ancient & Modern (1865) pp.140-141; Lyric Gems of Scotland (1856) 2 p.57; Whitelaw, Book of Scottish Song (1845) p.427; Smith, Scotish Minstrel (1st edn. (1820-24) 6 pp.78-79; (4th edn.) 6 pp.54-55; Select Songs of Scotland (1854) p.104; Scottish Minstrel (edn. B, c1813) pp.109-110; Caledonian Musical Repository (1811) pp.279-280.
There are also several more recent printed sources for the song listed.