diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-06-18 14:39:04 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-07-07 09:21:22 +0000 |
commit | d2a58462e6b2ffab0d636b1575c46a58099a82b7 (patch) | |
tree | bb2b5052d545843c4dacae3e4b3c34b20c54f4eb /morphlib | |
parent | 839e5315f1e1111429af25cb05eeb250c00b86b8 (diff) | |
download | morph-d2a58462e6b2ffab0d636b1575c46a58099a82b7.tar.gz |
Remove check on checkout/branch that there are systems
This was the wrong response to the problem of accidentally checking-out
morph when trying to check out morphs. Now that it's called definitions,
this is irrelevent, and aborting a checkout when this check fails is the
wrong thing to do.
Diffstat (limited to 'morphlib')
-rw-r--r-- | morphlib/plugins/branch_and_merge_new_plugin.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py index d6556b7b..27b12fe7 100644 --- a/morphlib/plugins/branch_and_merge_new_plugin.py +++ b/morphlib/plugins/branch_and_merge_new_plugin.py @@ -24,13 +24,6 @@ import shutil import morphlib -class BranchRootHasNoSystemsError(cliapp.AppException): - def __init__(self, repo, ref): - cliapp.AppException.__init__( - self, 'System branch root repository %s ' - 'has no system morphologies at ref %s' % (repo, ref)) - - class SimpleBranchAndMergePlugin(cliapp.Plugin): '''Add subcommands for handling workspaces and system branches.''' @@ -194,9 +187,6 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): gd.fat_init() gd.fat_pull() - if not self._checkout_has_systems(gd): - raise BranchRootHasNoSystemsError(root_url, base_ref) - def branch(self, args): '''Create a new system branch. @@ -258,9 +248,6 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): gd.fat_init() gd.fat_pull() - if not self._checkout_has_systems(gd): - raise BranchRootHasNoSystemsError(root_url, base_ref) - def _save_dirty_morphologies(self, loader, sb, morphs): logging.debug('Saving dirty morphologies: start') for morph in morphs: @@ -433,15 +420,6 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin): msg="WARNING: %(message)s", message=str(e), error=True) - @staticmethod - def _checkout_has_systems(gd): - loader = morphlib.morphloader.MorphologyLoader() - for filename in glob.iglob(os.path.join(gd.dirname, '*.morph')): - m = loader.load_from_file(filename) - if m['kind'] == 'system': - return True - return False - def foreach(self, args): '''Run a command in each repository checked out in a system branch. |