The have put pen to paper on 18-month contracts with the League One strugglers.
Hammond joined the Robins back in November on a short-term contract and has scored one goal in seven appearances.
Diallo, who originally joined on loan from MK Dons, has also signed a permanent deal with Martin Allen's side.
Allen is also in the process of securing the future of defender Darren Kenton on a longer-term deal.