changeset 48985:c75dae6e4ca7

rhg: sort unsupported extensions in error message This caused some flakiness in test output, and is also just better for users. Differential Revision: https://phab.mercurial-scm.org/D12389
author Raphaël Gomès <rgomes@octobus.net>
date Sat, 19 Mar 2022 15:44:38 +0100
parents e8138eba17ee
children d500df2e8034
files rust/rhg/src/main.rs
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/rust/rhg/src/main.rs	Sun Mar 13 15:48:18 2022 +0100
+++ b/rust/rhg/src/main.rs	Sat Mar 19 15:44:38 2022 +0100
@@ -674,6 +674,9 @@
     if unsupported.is_empty() {
         Ok(())
     } else {
+        let mut unsupported: Vec<_> = unsupported.into_iter().collect();
+        // Sort the extensions to get a stable output
+        unsupported.sort();
         Err(CommandError::UnsupportedFeature {
             message: format_bytes!(
                 b"extensions: {} (consider adding them to 'rhg.ignored-extensions' config)",