The repeal of ordinances and parts of ordinances of a permanent and general nature by § 10.05 shall not affect any offense committed or act done, any penalty or forfeiture incurred or any contract, right or obligation established prior to the time said ordinances and parts of ordinances are repealed.