Refactor replication_info filling.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>