The owners of adjoining lands shall keep up and maintain in good repair all partition fences between them in equal shares, so long as both parties continue to occupy or improve such lands, unless otherwise agreed.