summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-11-22 15:06:13 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2013-11-22 15:06:13 +0000
commitb2b618f71d63290efbc849650459ce6cd467621d (patch)
treeda35dfd0f45e427622ca2a51045b7d2a3122bda4 /morphlib/plugins
parent0b3ec68ce46f638e79e52f9f97f26727d9c4daa1 (diff)
parent53d53ef939ee66de9b6dfbf5d2fe215fc7723400 (diff)
downloadmorph-b2b618f71d63290efbc849650459ce6cd467621d.tar.gz
Merge remote-tracking branch 'origin/baserock/richardmaw/S9475/build-refactor-foundations-v2'
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/branch_and_merge_new_plugin.py18
1 files changed, 3 insertions, 15 deletions
diff --git a/morphlib/plugins/branch_and_merge_new_plugin.py b/morphlib/plugins/branch_and_merge_new_plugin.py
index 9c4cd53e..8ad9effd 100644
--- a/morphlib/plugins/branch_and_merge_new_plugin.py
+++ b/morphlib/plugins/branch_and_merge_new_plugin.py
@@ -305,9 +305,9 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
def _load_morphology_from_git(self, loader, gd, ref, filename):
try:
- text = gd.cat_file('blob', ref, filename)
+ text = gd.get_file_from_ref(ref, filename)
except cliapp.AppException:
- text = gd.cat_file('blob', 'origin/%s' % ref, filename)
+ text = gd.get_file_from_ref('origin/%s' % ref, filename)
return loader.load_from_string(text, filename)
def _load_stratum_morphologies(self, loader, sb, system_morph):
@@ -351,18 +351,6 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
logging.debug('All strata loaded')
return morphset
- def _invent_new_branch(self, cached_repo, default_name):
- counter = 0
- candidate = default_name
- while True:
- try:
- cached_repo.resolve_ref(candidate)
- except morphlib.cachedrepo.InvalidReferenceError:
- return candidate
- else:
- counter += 1
- candidate = '%s-%s' % (default_name, counter)
-
def edit(self, args):
'''Edit or checkout a component in a system branch.
@@ -793,7 +781,7 @@ class SimpleBranchAndMergePlugin(cliapp.Plugin):
if head != branch:
self.app.output.write(
' %s: unexpected ref checked out %r\n' % (repo, head))
- if any(gd.get_uncommitted_changes()):
+ if any(gd.get_index().get_uncommitted_changes()):
has_uncommitted_changes = True
self.app.output.write(' %s: uncommitted changes\n' % repo)