Preserve decorator state across webapi decorators.

Review Request #4652 — Created Sept. 26, 2013 and submitted — Latest diff uploaded

Information

Djblets
master

Reviewers

Preserve decorator state across webapi decorators.

Several of the webapi decorators attempted to set things like possible
error results, but they'd be lost, due to decorators not passing on that
information correctly. In some other cases, the wrong function would be
modified (which ended up working anyway, due to the function's
dictionary being transferred after, but it polluted the function).

There's now a @webapi_decorator, which intelligently merges things like
the error response and request field lists. It's meant as a replacement
for @simple_decorator for creating webapi-specific decorators.

Along with this, the calls to @webapi_response_errors in decorators have
been moved to decorate the correct function.

Added new unit tests, which pass.

Tested with my API lintian tool that error responses were being set correctly
now.