diff options
author | Ric Holland <richard.holland@codethink.co.uk> | 2013-03-14 12:08:54 +0000 |
---|---|---|
committer | Ric Holland <richard.holland@codethink.co.uk> | 2013-03-14 12:08:54 +0000 |
commit | 5d0d78ca5fabfdd2f7eaf7a9a889d68812883ad7 (patch) | |
tree | 34aea517265768facff6d08886c7ee9b99669075 /morphlib/plugins/branch_and_merge_plugin.py | |
parent | 9f053dc019f7de13fa8acd3ec049a20e680d0ad6 (diff) | |
download | morph-5d0d78ca5fabfdd2f7eaf7a9a889d68812883ad7.tar.gz |
Changed metadata_dir from an optional argument to a setting
morph branch-from-image
Diffstat (limited to 'morphlib/plugins/branch_and_merge_plugin.py')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 141c3187..32158a88 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -73,7 +73,14 @@ class BranchAndMergePlugin(cliapp.Plugin): arg_synopsis='SYSTEM') self.app.add_subcommand('status', self.status) self.app.add_subcommand('branch-from-image', self.branch_from_image, - arg_synopsis='REPO BRANCH [METADATADIR]') + arg_synopsis='REPO BRANCH') + group_branch = 'Branching Options' + self.app.settings.string(['metadata-dir'], + 'Set metadata location for branch-from-image' + ' (default: /baserock)', + metavar='DIR', + default='/baserock', + group=group_branch) # Advanced commands self.app.add_subcommand('foreach', self.foreach, @@ -859,7 +866,7 @@ class BranchAndMergePlugin(cliapp.Plugin): 'branch-from-image needs repository, ref and path to metadata') root_repo = args[0] branch = args[1] - metadata_path = '/baserock' if len(args) == 2 else args[2] + metadata_path = self.app.settings['metadata-dir'] workspace = self.deduce_workspace() self.lrc, self.rrc = morphlib.util.new_repo_caches(self.app) |