diff options
author | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-10-18 12:02:38 +0100 |
---|---|---|
committer | Sam Thursfield <sam.thursfield@codethink.co.uk> | 2012-10-18 12:23:50 +0100 |
commit | e1ee5840b7e3bb034894fb3a3450dbeaa655b73f (patch) | |
tree | 1f66d9994130ca26f73b293f568322618422c18b | |
parent | cf7ed1cb79d4862c92261ac57a27b082a8f10f84 (diff) | |
download | morph-e1ee5840b7e3bb034894fb3a3450dbeaa655b73f.tar.gz |
morph status: Sort list of system branches in a workspace
Output needs to be stable, not least so that the test doesn't fail
sporadically.
-rw-r--r-- | morphlib/plugins/branch_and_merge_plugin.py | 5 | ||||
-rw-r--r-- | tests.branching/status-in-workspace.stdout | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py index 384f0550..6d5f3b7c 100644 --- a/morphlib/plugins/branch_and_merge_plugin.py +++ b/morphlib/plugins/branch_and_merge_plugin.py @@ -1324,8 +1324,9 @@ 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 = sorted(self.walk_special_directories( + workspace, special_subdir='.morph-system-branch')) + 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 8d34a8a6..15958736 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 |