In CL https://codereview.chromium.org/2608483002/ we reorganize the FindSuspects function to take a factory function ``get_repository``. This fixes half the problem discussed there: with that CL, the FindSuspects function does not depend on the ``repository`` object having a settable ``repo_url`` property (as it shouldn't, since the ``Repository`` interface doesn't guarantee the existence of such a property).
There remains the other half of the problem: mutating the main repository object in place can have unforeseen consequences. As of that CL, the actual functions we pass to FindSuspects still mutate the main repo object rather than generating a new one. That CL doesn't try to solve this half of the problem because doing so would make for an overly large CL.
A future CL should get rid of the mutation and pass actual factory functions to FindSuspects, eliminating the worry about unexpected side-effects of classifying CLs. Of particular note, the factory functions will have to work appropriately for both the AppEngine code (which uses the GitilesRepository implementation of Repository) and for delta-testing code (which uses the LocalGitRepository implementation).
Comment 1 by wrengr@chromium.org
, Dec 28 2016Status: Started (was: Available)