diff rust/hg-core/src/repo.rs @ 46748:12d59eec7f1d

rhg: Align with Python on some more error messages Differences can cause some tests to fail Differential Revision: https://phab.mercurial-scm.org/D10133
author Simon Sapin <simon.sapin@octobus.net>
date Thu, 04 Mar 2021 13:30:20 +0100
parents dfd35823635b
children 97ac588b6d9e
line wrap: on
line diff
--- a/rust/hg-core/src/repo.rs	Fri Mar 12 22:38:40 2021 +0100
+++ b/rust/hg-core/src/repo.rs	Thu Mar 04 13:30:20 2021 +0100
@@ -141,20 +141,22 @@
 
             if share_safe && !source_is_share_safe {
                 return Err(match config
-                    .get(b"safe-mismatch", b"source-not-safe")
+                    .get(b"share", b"safe-mismatch.source-not-safe")
                 {
                     Some(b"abort") | None => HgError::abort(
-                        "share source does not support share-safe requirement",
+                        "abort: share source does not support share-safe requirement\n\
+                        (see `hg help config.format.use-share-safe` for more information)",
                     ),
                     _ => HgError::unsupported("share-safe downgrade"),
                 }
                 .into());
             } else if source_is_share_safe && !share_safe {
                 return Err(
-                    match config.get(b"safe-mismatch", b"source-safe") {
+                    match config.get(b"share", b"safe-mismatch.source-safe") {
                         Some(b"abort") | None => HgError::abort(
-                            "version mismatch: source uses share-safe \
-                            functionality while the current share does not",
+                            "abort: version mismatch: source uses share-safe \
+                            functionality while the current share does not\n\
+                            (see `hg help config.format.use-share-safe` for more information)",
                         ),
                         _ => HgError::unsupported("share-safe upgrade"),
                     }