diff rust/rhg/src/error.rs @ 46821:e8ae91b1a63d

rhg: raise wdir specific error for `hg debugdata` Helps remove the conditional in `test-debugcommands.t` for rhg. Differential Revision: https://phab.mercurial-scm.org/D10254
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 23 Mar 2021 19:58:49 +0530
parents 821929d59e01
children 6e49769b7f97
line wrap: on
line diff
--- a/rust/rhg/src/error.rs	Sat Mar 20 02:03:57 2021 +0530
+++ b/rust/rhg/src/error.rs	Tue Mar 23 19:58:49 2021 +0530
@@ -157,6 +157,9 @@
 impl From<(RevlogError, &str)> for CommandError {
     fn from((err, rev): (RevlogError, &str)) -> CommandError {
         match err {
+            RevlogError::WDirUnsupported => CommandError::abort(
+                "abort: working directory revision cannot be specified",
+            ),
             RevlogError::InvalidRevision => CommandError::abort(format!(
                 "abort: invalid revision identifier: {}",
                 rev