Section 77. The board of aldermen or selectmen, after the expiration of one year from the opening for use of a street railway in their city or town, and after public notice and a hearing as provided in section seven, if public necessity and convenience in the use of the public ways so require, may, for good and sufficient reasons to be stated in the order therefor, revoke the location of a street railway in any public way therein; but unless, within thirty days after such order of revocation, the company consents thereto in writing, such order shall not be valid until approved by the department after public notice and a hearing. If such order of revocation is approved, the company shall become obligated to remove the railway included in the location thus revoked at such time or times as the municipal or state authorities having control of the public way or ways occupied thereby shall propose to resurface any part or parts of such way or ways or to remove the same forthwith upon order of the board of aldermen or selectmen, but it shall be under no obligation to pay for any part of the resurfacing thereof. Upon receiving written notice from such municipal or state authorities at any time after the approval of such revocation that it is proposed to resurface any part or parts of such way or ways, the company shall thereupon remove at its own expense the railway from such part or parts included in the location so revoked coincidentally with the resurfacing of such way or ways. If the company shall fail to remove its railway as above provided, such municipal or state authorities may cause the work to be done at the expense of the company, and such expense may be recovered in tort.