diff options
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/branch_and_merge_new_plugin.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py index 7191979b..af3f9665 100644 --- a/morphlib/plugins/branch_and_merge_new_plugin.py +++ b/morphlib/plugins/branch_and_merge_new_plugin.py @@ -381,10 +381,13 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): loader = morphlib.morphloader.MorphologyLoader() morphs = self._load_all_sysbranch_morphologies(sb, loader) + found = 0 + for morph in morphs.morphologies: if morph['kind'] == 'stratum': for chunk in morph['chunks']: if chunk['name'] == chunk_name: + found = found + 1 self.app.status( msg='Editing %(chunk)s in %(stratum)s stratum', chunk=chunk_name, stratum=morph['name']) @@ -418,6 +421,19 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): self._save_dirty_morphologies(loader, sb, morphs.morphologies) + if found == 0: + self.app.status(msg="No chunk %(chunk)s found. If you want " + "to create one, add an entry to a stratum morph file.", + chunk=chunk_name) + + if found >= 1: + self.app.status(msg="Chunk %(chunk)s source is available at " + "%(dir)s", chunk=chunk_name, dir=chunk_dirname) + + if found > 1: + self.app.status(msg="Notice that this chunk appears in " + "more than one stratum") + def show_system_branch(self, args): '''Show the name of the current system branch.''' |