rhg-cat: fallback in presence of a fileset
These are unsupported so far.
Differential Revision: https://phab.mercurial-scm.org/D11379
--- 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() == "..");
--- 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