On Thu, Oct 18, 2012 at 12:04:19PM +0100, Sam Thursfield wrote:
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()
list(self.walk_special_directories(...)) will also create a list from
any iterable.
sorted(iterable) will create the list in sorted order.