| Index: recipe_modules/gclient/test_api.py
|
| diff --git a/recipe_modules/gclient/test_api.py b/recipe_modules/gclient/test_api.py
|
| index 499651bbc6366740c528c4c6ec0e6634bb24a390..58d678419b4146e162433a74f3b8735b67011455 100644
|
| --- a/recipe_modules/gclient/test_api.py
|
| +++ b/recipe_modules/gclient/test_api.py
|
| @@ -7,13 +7,12 @@ import hashlib
|
| from recipe_engine import recipe_test_api
|
|
|
| class GclientTestApi(recipe_test_api.RecipeTestApi):
|
| - def output_json(self, projects, git_mode=False):
|
| + def output_json(self, projects):
|
| """Deterministically synthesize json.output test data for gclient's
|
| --output-json option.
|
|
|
| Args:
|
| projects - a list of project paths (e.g. ['src', 'src/dependency'])
|
| - git_mode - Return git hashes instead of svn revs.
|
| """
|
| # TODO(iannucci): Account for parent_got_revision_mapping. Right now the
|
| # synthesized json output from this method will always use
|
| @@ -21,17 +20,13 @@ class GclientTestApi(recipe_test_api.RecipeTestApi):
|
| # specified, we should use those values instead.
|
| return self.m.json.output({
|
| 'solutions': dict(
|
| - (p+'/', {'revision': self.gen_revision(p, git_mode)})
|
| + (p+'/', {'revision': self.gen_revision(p)})
|
| for p in projects
|
| )
|
| })
|
|
|
| @staticmethod
|
| - def gen_revision(project, GIT_MODE):
|
| + def gen_revision(project):
|
| """Hash project to bogus deterministic revision values."""
|
| h = hashlib.sha1(project)
|
| - if GIT_MODE:
|
| - return h.hexdigest()
|
| - else: # pragma: no cover
|
| - import struct
|
| - return struct.unpack('!I', h.digest()[:4])[0] % 300000
|
| + return h.hexdigest()
|
|
|