diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-12 13:02:59 +0000 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2015-01-12 13:02:59 +0000 |
commit | 28dd2ba113f40370586d693dd62e699897521ed8 (patch) | |
tree | 16032707e914bdadafea74319a510c0a7c43e7ff /morphlib/plugins | |
parent | f3197d814a5e883f47631a4f0acfa51bd1285daf (diff) | |
parent | 7e975343c7f00e98962d2edd07ac87630c4936c4 (diff) | |
download | morph-28dd2ba113f40370586d693dd62e699897521ed8.tar.gz |
Merge branch 'sam/cached-repo-cleanup'
Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk>
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
Diffstat (limited to 'morphlib/plugins')
-rw-r--r-- | morphlib/plugins/artifact_inspection_plugin.py | 4 | ||||
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/morphlib/plugins/artifact_inspection_plugin.py b/morphlib/plugins/artifact_inspection_plugin.py index 74645f41..2d1fe979 100644 --- a/morphlib/plugins/artifact_inspection_plugin.py +++ b/morphlib/plugins/artifact_inspection_plugin.py @@ -51,7 +51,7 @@ class ProjectVersionGuesser(object): if self.lrc.has_repo(repo): repository = self.lrc.get_repo(repo) for filename in filenames: - yield filename, repository.cat(ref, filename) + yield filename, repository.read_file(filename, ref) elif self.rrc: for filename in filenames: yield filename, self.rrc.cat_file(repo, ref, filename) @@ -153,7 +153,7 @@ class VersionGuesser(object): repository = self.lrc.get_repo(repo) if not self.app.settings['no-git-update']: repository.update() - tree = repository.ls_tree(ref) + tree = repository.list_files(ref=ref, recurse=False) elif self.rrc: repository = None tree = self.rrc.ls_tree(repo, ref) diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 5531f7f6..76da9736 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -174,7 +174,7 @@ class BranchAndMergePlugin(cliapp.Plugin): cached_repo = lrc.get_updated_repo(root_url) # Check the git branch exists. - cached_repo.resolve_ref(system_branch) + cached_repo.resolve_ref_to_commit(system_branch) with self._initializing_system_branch( ws, root_url, system_branch, cached_repo, base_ref) as (sb, gd): @@ -233,7 +233,7 @@ class BranchAndMergePlugin(cliapp.Plugin): (system_branch, root_url)) # Make sure the base_ref exists. - cached_repo.resolve_ref(base_ref) + cached_repo.resolve_ref_to_commit(base_ref) with self._initializing_system_branch( ws, root_url, system_branch, cached_repo, base_ref) as (sb, gd): |