Section 29. If a person is injured in his land by horses, mules, asses, neat cattle, sheep, goats or swine, he may recover his damages in an action against the owner of the beasts or by distraining the beasts doing the damage and proceeding therewith as hereinafter directed.