Patchwork D12389: rhg: sort unsupported extensions in error message

login
register
mail settings
Submitter phabricator
Date March 19, 2022, 2:46 p.m.
Message ID <differential-rev-PHID-DREV-qeiwzigyhhw5p7suwq27-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50733/
State New
Headers show

Comments

phabricator - March 19, 2022, 2:46 p.m.
Alphare created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REVISION SUMMARY
  This caused some flakiness in test output, and is also just better for users.

REPOSITORY
  rHG Mercurial

BRANCH
  default

REVISION DETAIL
  https://phab.mercurial-scm.org/D12389

AFFECTED FILES
  rust/rhg/src/main.rs

CHANGE DETAILS




To: Alphare, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/rust/rhg/src/main.rs b/rust/rhg/src/main.rs
--- a/rust/rhg/src/main.rs
+++ b/rust/rhg/src/main.rs
@@ -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)",