rhg: sort unsupported extensions in error message
authorRaphaël Gomès <rgomes@octobus.net>
Sat, 19 Mar 2022 15:44:38 +0100
changeset 49064 c75dae6e4ca7
parent 49063 e8138eba17ee
child 49065 d500df2e8034
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
rust/rhg/src/main.rs
--- 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)",