Show More
@@ -69,6 +69,14 b' fn main_with_result(' | |||
|
69 | 69 | |
|
70 | 70 | let (subcommand_name, subcommand_matches) = matches.subcommand(); |
|
71 | 71 | |
|
72 | // Mercurial allows users to define "defaults" for commands, fallback | |
|
73 | // if a default is detected for the current command | |
|
74 | let defaults = config.get_str(b"defaults", subcommand_name.as_bytes()); | |
|
75 | if defaults?.is_some() { | |
|
76 | let msg = "`defaults` config set"; | |
|
77 | return Err(CommandError::unsupported(msg)); | |
|
78 | } | |
|
79 | ||
|
72 | 80 | for prefix in ["pre", "post", "fail"].iter() { |
|
73 | 81 | // Mercurial allows users to define generic hooks for commands, |
|
74 | 82 | // fallback if any are detected |
@@ -228,6 +228,12 b' Fallback with generic hooks' | |||
|
228 | 228 | unsupported feature: fail-cat hook defined |
|
229 | 229 | [252] |
|
230 | 230 | |
|
231 | Fallback with [defaults] | |
|
232 | $ $NO_FALLBACK rhg cat original --config "defaults.cat=-r null" | |
|
233 | unsupported feature: `defaults` config set | |
|
234 | [252] | |
|
235 | ||
|
236 | ||
|
231 | 237 | Requirements |
|
232 | 238 | $ $NO_FALLBACK rhg debugrequirements |
|
233 | 239 | dotencode |
General Comments 0
You need to be logged in to leave comments.
Login now