chipx86 got review request #1000!
Allow Default Reviewers to be bound to one or more repositories.
Review Request #1000 — Created Aug. 25, 2009 and submitted
Allow Default Reviewers to be bound to one or more repositories. Our Default Reviewer code pre-dated our multi-repository support, and was never updated to work with repositories. In most cases, a default reviewer path really makes sense only in the context of a single repository, or maybe just a couple. This change allows a Default Reviewer to be bound to one or more repositories. A Default Reviewer that isn't bound to any particular repository will continue to work with all repositories, partly for backwards-compatibility, partly for the maintenance burden on the administrator's behalf. As part of this, I've cleaned up the Default Reviewer administration page: * The Name and Regex fields are now longer. * Regular expressions are validated before saving. * The Default Groups field is now a smart side-by-side add/remove field instead of a basic multi-selection field. NOTE: This is a migration to Git for /r/981/. See there for screenshots.
Added unit tests for the repository query code, which I've verified works fine. This query code handles checking for default reviewers that either match the given repository or don't specify any repository (therefore working with all). Tested the regular expression validation.
PD
-
FYI i downloaded the master version from github and applied this patch. When i try to configure a default reviewer, i get an error: IntegrityError at /reviews/admin/db/reviews/defaultreviewer/add/ reviews_defaultreviewer.file_regex may not be NULL I tried with a brand new installation and still get the same error. FYI the params for the sqlite execute method are: params (u'Test', None) query 'INSERT INTO "reviews_defaultreviewer" ("name", "file_regex") VALUES (?, ?)' self <django.db.backends.sqlite3.base.SQLiteCursorWrapper object at 0x047F23D8>