diff rust/rhg/src/error.rs @ 52041:652149ed64f0

rust: improve `InvalidRevision` error message I encountered this when debugging earlier and felt like we were losing some information along the way, which we were!
author Rapha?l Gom?s <rgomes@octobus.net>
date Tue, 01 Oct 2024 13:20:40 +0200
parents c112cc9effdc
children db065b33fa56 77b95a4abbb2
line wrap: on
line diff
--- a/rust/rhg/src/error.rs	Mon Sep 30 17:19:35 2024 +0200
+++ b/rust/rhg/src/error.rs	Tue Oct 01 13:20:40 2024 +0200
@@ -207,9 +207,9 @@
             RevlogError::WDirUnsupported => CommandError::abort(
                 "abort: working directory revision cannot be specified",
             ),
-            RevlogError::InvalidRevision => CommandError::abort(format!(
+            RevlogError::InvalidRevision(r) => CommandError::abort(format!(
                 "abort: invalid revision identifier: {}",
-                rev
+                r
             )),
             RevlogError::AmbiguousPrefix => CommandError::abort(format!(
                 "abort: ambiguous revision identifier: {}",