Mercurial > public > mercurial-scm > hg-stable
diff rust/rhg/src/commands/cat.rs @ 48088:4a6fa6b6f079
rhg-cat: fallback in presence of a fileset
These are unsupported so far.
Differential Revision: https://phab.mercurial-scm.org/D11379
author | Rapha?l Gom?s <rgomes@octobus.net> |
---|---|
date | Wed, 01 Sep 2021 17:41:08 +0200 |
parents | 1e00834491a5 |
children | 08c8cd2527bc |
line wrap: on
line diff
--- 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() == "..");