The technology of distributed version control should be applied to legal text much like it is to code. A proposed law is pull request. An enacted law is an accepted pull request. Various jurisdictions can fork and merge laws.
And while we're at it, let's build domain specific languages for laws with with well defined syntax, in order to disambiguate law at least as much as politics will allow.