Refactor source_control.py and add a test.
Originally, Simon made SourceControl a class becaused we expected to add a SvnSourceControl subclass which implemented the same methods in different ways. However, after the git transition we're fairly sure that we don't want to do this. So, all of the functions in the SourceControl class can be made top-level functions that don't need a "self" argument. This way, there's no need to pass around a bogus SourceControl object; the functions can be called directly. I also added tests for some methods that seemed relatively testable. PTAL and give suggestions :-) BUG= Review URL: https://codereview.chromium.org/650223005 Cr-Commit-Position: refs/heads/master@{#299851}
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment