Merge and port master to api, and refactor

Review Request #3738 — Created Jan. 10, 2013 and submitted — Latest diff uploaded

Information

RBTools
api

Reviewers

Merged master into api and ported recent changes to the new commands.
I also started the process of refactoring things a bit:

Port capabilities to rbt post

rbt post will now download and use capabilities when generating
diffs. Diffs generated by git may now use -M.


Refactor rbt post to use common code

Removed a lot of the repeated code rbt post was using which had been
moved into the Command base class. Also stopped creating some of the
variables on self, and instead passed them into the methods which need
them.


Port capabilities to rbt diff

rbt diff will now use the new capabilities change when generating
diffs. This adds moved file detection to git diffs.

The python API bindings were also modified to allow accessing resource
fields using the '[]' operator. Now fields may be accessed either by
attribute (e.g. 'resource.<field_name>') or using the '[]' operator
(e.g. 'resource["<field_name>"]').

Adding '[]' operator access made porting the capabilities change while
maintaining compatibility with post-review much cleaner.


Port 494a21d145 from post-review to rbt post

Port 85f43d522e from post-review to rbt post
Generated diffs and observed proper capabilities behaviour.
Posted review requests using rbt post.