Output needs to be stable, not least so that the test doesn't fail
sporadically.
---
morphlib/plugins/branch_and_merge_plugin.py | 6 ++++--
tests.branching/status-in-workspace.stdout | 2 +-
2 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 384f055..b11fbd5 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -1324,8 +1324,10 @@ class BranchAndMergePlugin(cliapp.Plugin):
if branch is None:
self.app.output.write("System branches in current workspace:\n")
- for dirname in self.walk_special_directories(
- workspace, special_subdir='.morph-system-branch'):
+ branch_dirs = [d for d in self.walk_special_directories(
+ workspace, special_subdir='.morph-system-branch')]
+ branch_dirs.sort()
+ for dirname in branch_dirs:
branch = self.get_branch_config(dirname, 'branch.name')
self.app.output.write(" %s\n" % branch)
return
diff --git a/tests.branching/status-in-workspace.stdout
b/tests.branching/status-in-workspace.stdout
index 8d34a8a..1595873 100644
--- a/tests.branching/status-in-workspace.stdout
+++ b/tests.branching/status-in-workspace.stdout
@@ -1,4 +1,4 @@
System branches in current workspace:
- master
a/b/c/d/e/bar
a/b/c/d/e/foo
+ master
--
1.7.10.4