Green’s Dictionary of Slang

polly n.2

In phrases

doing polly [ety. unknown]

(UK prison) picking oakum.

[US]Matsell Vocabulum.
[Aus]Argus (Melbourne) 20 Sept. 6/4: In doing Polly or diamond cracking [...] picking oakum and breaking stones [he] passes the leaden days.