# HG changeset patch # User Raphaël Gomès # Date 1630510868 -7200 # Node ID 4a6fa6b6f0794219582afb9c574d690c8960afce # Parent 1e00834491a563ac0886e65c291ce52cb054fcd6 rhg-cat: fallback in presence of a fileset These are unsupported so far. Differential Revision: https://phab.mercurial-scm.org/D11379 diff -r 1e00834491a5 -r 4a6fa6b6f079 rust/rhg/src/commands/cat.rs --- a/rust/rhg/src/commands/cat.rs Wed Sep 01 17:40:25 2021 +0200 +++ b/rust/rhg/src/commands/cat.rs Wed Sep 01 17:41:08 2021 +0200 @@ -46,6 +46,11 @@ let mut files = vec![]; for file in file_args.iter() { + if file.starts_with("set:") { + let message = "fileset"; + return Err(CommandError::unsupported(message)); + } + let normalized = cwd.join(&file); // TODO: actually normalize `..` path segments etc? let dotted = normalized.components().any(|c| c.as_os_str() == ".."); diff -r 1e00834491a5 -r 4a6fa6b6f079 tests/test-rhg.t --- a/tests/test-rhg.t Wed Sep 01 17:40:25 2021 +0200 +++ b/tests/test-rhg.t Wed Sep 01 17:41:08 2021 +0200 @@ -210,6 +210,11 @@ unsupported feature: `..` or `.` path segment [252] +Fallback with filesets + $ $NO_FALLBACK rhg cat "set:c or b" + unsupported feature: fileset + [252] + Requirements $ $NO_FALLBACK rhg debugrequirements dotencode