diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-06 12:03:02 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-08-06 16:28:19 +0100 |
commit | 16f17f5d713960ab3ed9981b0b554e3657fb82f9 (patch) | |
tree | b155a53d5d80b18981bb90730a5ab027d54afd35 /morphlib/plugins/branch_and_merge_plugin.py | |
parent | 437ce27de0fec13d3efa939c04d17164049ccbfc (diff) | |
download | morph-16f17f5d713960ab3ed9981b0b554e3657fb82f9.tar.gz |
Re-implement "morph branch" using new infrastructure
Diffstat (limited to 'morphlib/plugins/branch_and_merge_plugin.py')
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 6f3a8c87..62a9f925 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -57,8 +57,6 @@ class BranchAndMergePlugin(cliapp.Plugin): def enable(self): # User-facing commands - self.app.add_subcommand('branch', self.branch, - arg_synopsis='REPO NEW [OLD]') self.app.add_subcommand('merge', self.merge, arg_synopsis='BRANCH') self.app.add_subcommand('edit', self.edit, @@ -575,46 +573,6 @@ class BranchAndMergePlugin(cliapp.Plugin): self.remove_branch_dir_safe(workspace, branch_name) raise - @warns_git_identity - def branch(self, args): - '''Create a new system branch. - - Command line arguments: - - * `REPO` is a repository URL. - * `NEW` is the name of the new system branch. - * `OLD` is the point from which to branch, and defaults to `master`. - - This creates a new system branch. It needs to be run in an - existing workspace (see `morph workspace`). It creates a new - git branch in the clone of the repository in the workspace. The - system branch will not be visible on the git server until you - push your changes to the repository. - - Example: - - cd /src/workspace - morph branch baserock:baserock:morphs jrandom/new-feature - - ''' - - if len(args) not in [2, 3]: - raise cliapp.AppException('morph branch needs name of branch ' - 'as parameter') - - repo = args[0] - new_branch = args[1] - commit = 'master' if len(args) == 2 else args[2] - - self.lrc, self.rrc = morphlib.util.new_repo_caches(self.app) - if self.get_cached_repo(repo).ref_exists(new_branch): - raise cliapp.AppException('branch %s already exists in ' - 'repository %s' % (new_branch, repo)) - - # Create the system branch directory. - workspace = self.deduce_workspace() - self._create_branch(workspace, new_branch, repo, commit) - def checkout_repository(self, branch_dir, repo, ref, parent_ref=None): '''Make a chunk or stratum repository available for a system branch |