Chromium Code Reviews| Index: chrome/common/extensions/docs/server2/app_yaml_helper.py |
| diff --git a/chrome/common/extensions/docs/server2/app_yaml_helper.py b/chrome/common/extensions/docs/server2/app_yaml_helper.py |
| index d2bb706f97a7d133209336a17b48ef574b97f225..d965f96de67e9b25b82d8e6000fccaa76672058b 100644 |
| --- a/chrome/common/extensions/docs/server2/app_yaml_helper.py |
| +++ b/chrome/common/extensions/docs/server2/app_yaml_helper.py |
| @@ -25,7 +25,7 @@ class AppYamlHelper(object): |
| host_file_system_provider): |
| self._store = object_store_creator.Create( |
| AppYamlHelper, |
| - category=host_file_system_provider.GetTrunk().GetIdentity(), |
| + category=host_file_system_provider.GetMaster().GetIdentity(), |
| start_empty=False) |
| self._host_file_system_provider = host_file_system_provider |
| @@ -74,7 +74,7 @@ class AppYamlHelper(object): |
| checked into the host file system. |
| ''' |
| checked_in_app_version = AppYamlHelper.ExtractVersion( |
| - self._host_file_system_provider.GetTrunk().ReadSingle(APP_YAML).Get()) |
| + self._host_file_system_provider.GetMaster().ReadSingle(APP_YAML).Get()) |
| if app_version == checked_in_app_version: |
| return True |
| if AppYamlHelper.IsGreater(app_version, checked_in_app_version): |
| @@ -100,6 +100,8 @@ class AppYamlHelper(object): |
| return stored |
| def _GetFirstRevisionGreaterThanImpl(self, app_version): |
| + # XXX(ahernandez): Tricky. The 'version' of app.yaml coming from |
| + # GitilesFileSystem is a blob ID. |
| def get_app_yaml_revision(file_system): |
| return int(file_system.Stat(APP_YAML).version) |
|
not at google - send to devlin
2014/08/26 22:52:23
Yeah int-ing this isn't going to work obviously. C
ahernandez
2014/08/26 23:35:56
Does GetPreviousCommitID need to be implemented in
not at google - send to devlin
2014/08/27 01:07:13
I was assuming we'd implement all of this function
Ken Rockot(use gerrit already)
2014/08/29 07:24:42
So I'm spinning all of this context back up in my
|
| @@ -109,7 +111,7 @@ class AppYamlHelper(object): |
| return AppYamlHelper.IsGreater(app_version_in_file_system, app_version) |
| found = None |
| - next_file_system = self._host_file_system_provider.GetTrunk() |
| + next_file_system = self._host_file_system_provider.GetMaster() |
| while has_greater_app_version(next_file_system): |
| found = get_app_yaml_revision(next_file_system) |
| @@ -117,8 +119,8 @@ class AppYamlHelper(object): |
| if found == 0: |
| logging.warning('All revisions are greater than %s' % app_version) |
| return 0 |
| - next_file_system = self._host_file_system_provider.GetTrunk( |
| - revision=found - 1) |
| + next_file_system = self._host_file_system_provider.GetMaster( |
| + commit=next_file_system.GetPreviousCommitID().Get()) |
| if found is None: |
| raise ValueError('All revisions are less than %s' % app_version) |