Hegarty, O'Hegarty, it's the same name either way. I think this song goes a bit further back than the Charles O'Hegarty in the other link.
But maybe not. The first time I came across it was in a copy of Sing Out many years ago, where it was paired with The Cat Came Back, which is essentially the same tune, the suggestion is the one grew out of the other. There might have been more about it there - maybe if someone's got a Sing-Out archive they could check up.
I'd assumed it was music-hall from the early part of the last century maybe. Half-a-crown indicates it as being from the East side of the Atlantic. Though it maybe also indicates it might have been later than I thought - half-a-crown would have been a very fair sized tip at the start of the century.
If we can't find the truth of it through the Mudcat, noone ever will.