/trunk/reviewboard/scmtools/mtn.py (Diff revision 1)
Standardize SCM-related errors a bit and handle EmptyChangeSetError
Review Request #748 — Created Feb. 19, 2009 and submitted
|Review Board SVN (deprecated)|
We had SCM-related errors scattered around a bit in three places: reviews.errors, scmtools.core, and scmtools.perforce. They've now all been moved to scmtools.errors, and all derive from SCMError. Since EmptyChangeSetError is now standard and not tied to the Perforce module, we can check for it specifically in the API handler for new review requests and return an appropriate error, instead of a 500 like we've had before.
Passes unit tests. I don't have Perforce set up on this laptop, so I can't test the handler for the changeset, but it should work.
Forgot to add scmtools/errors.py, apparently.
/trunk/reviewboard/scmtools/errors.py (Diff revision 2)
Too many blank lines here.