diff rust/rhg/src/main.rs @ 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 6b31c0676147
children 137a93125902
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)",