diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-19 13:33:14 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-09-24 10:35:21 +0000 |
commit | dc4bc05fab0cb738b0051d8e3e037ae73cb9f0a6 (patch) | |
tree | 72aa55af48d9440b172796dae29ca6e855ea448b | |
parent | 68cc00437b4804d5fac3a96ea9aa7f50ce9609ab (diff) | |
download | morph-dc4bc05fab0cb738b0051d8e3e037ae73cb9f0a6.tar.gz |
b&m: Use new MorphSet api in unpetrify
-rw-r--r-- | morphlib/plugins/branch_and_merge_new_plugin.py | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py index 4329e0c2..39552ef0 100644 --- a/morphlib/plugins/branch_and_merge_new_plugin.py +++ b/morphlib/plugins/branch_and_merge_new_plugin.py @@ -708,33 +708,11 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): ws = morphlib.workspace.open('.') sb = morphlib.sysbranchdir.open_from_within('.') loader = morphlib.morphloader.MorphologyLoader() - lrc, rrc = morphlib.util.new_repo_caches(self.app) - update_repos = not self.app.settings['no-git-update'] - done = set() morphs = self._load_all_sysbranch_morphologies(sb, loader) # Restore the ref for each stratum and chunk - def unpetrify_specs(specs): - dirty = False - for spec in specs: - ref = spec['ref'] - # Don't attempt to unpetrify refs which aren't petrified - if not ('unpetrify-ref' in spec - and morphlib.git.is_valid_sha1(ref)): - continue - spec['ref'] = spec.pop('unpetrify-ref') - dirty = True - return dirty - - for m in morphs.morphologies: - dirty = False - if m['kind'] == 'system': - dirty = dirty or unpetrify_specs(m['strata']) - elif m['kind'] == 'stratum': - dirty = dirty or unpetrify_specs(m['build-depends']) - dirty = dirty or unpetrify_specs(m['chunks']) - m.dirty = True + morphs.unpetrify_all() # Write morphologies back out again. self._save_dirty_morphologies(loader, sb, morphs.morphologies) |