Section 138. A person who during any license period becomes the owner or keeper of a dog which is duly licensed in the town or city where it is to be kept shall forthwith give notice in writing to the clerk of such town or city, or if kept in Boston to the police commissioner, that he has become such owner or keeper and said clerk or police commissioner, as the case may be, shall change the record of such license to show the name and address of the new owner or keeper. Any person bringing or causing to be brought from another state or country any dog licensed under the laws thereof which is 6 months old or over or will be 6 months old before the expiration of thirty days therefrom shall, on or before the expiration of thirty days following the arrival of such dog within the commonwealth, cause such dog to be registered, numbered, described and licensed for the remainder of the then current license period.