summaryrefslogtreecommitdiff
path: root/morphlib/plugins
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-10-10 16:03:53 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-10-10 16:52:22 +0100
commit3abc867e6590b4306a7d8c39c4a0f39b2883f648 (patch)
treee2f782322b0f236373b2852d2fc5cf7a8050c88c /morphlib/plugins
parentbd31733cd891ac642c73d9c0aa3c48d623d58f10 (diff)
downloadmorph-3abc867e6590b4306a7d8c39c4a0f39b2883f648.tar.gz
morph foreach: Handle repos addressed by full URLs correctly
This should not normally be used, because we make no attempt to detect when a full URL and a keyed URL are equivalent, so they cannot be used interchangably. However, 'foreach' would previously fail completely if the branch root happened to be a full URL because it didn't call convert_uri_to_path() correctly.
Diffstat (limited to 'morphlib/plugins')
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index e54fe7ad..b14a9ef7 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -1169,13 +1169,15 @@ class BranchAndMergePlugin(cliapp.Plugin):
workspace = self.deduce_workspace()
branch, branch_path = self.deduce_system_branch()
- root_repo_dir = self.get_branch_config(branch_path, 'branch.root')
+
+ root_repo = self.get_branch_config(branch_path, 'branch.root')
+ root_repo_dir = self.convert_uri_to_path(root_repo)
+ root_repo_path = os.path.join(branch_path, root_repo_dir)
dirs = [d for d in self.walk_special_directories(
branch_path, special_subdir='.git')
- if os.path.basename(d) != root_repo_dir]
+ if not os.path.samefile(d, root_repo_path)]
dirs.sort()
- root_repo_path = os.path.join(branch_path, root_repo_dir)
for d in [root_repo_path] + dirs:
try:
repo = self.get_repo_config(d, 'morph.repository')