##// END OF EJS Templates
rhg: add support for ignoring all extensions...
Raphaël Gomès -
r49829:6b31c067 default
parent child Browse files
Show More
@@ -643,6 +643,11 b' const SUPPORTED_EXTENSIONS: &[&[u8]] ='
643 &[b"blackbox", b"share", b"sparse", b"narrow", b"*"];
643 &[b"blackbox", b"share", b"sparse", b"narrow", b"*"];
644
644
645 fn check_extensions(config: &Config) -> Result<(), CommandError> {
645 fn check_extensions(config: &Config) -> Result<(), CommandError> {
646 if let Some(b"*") = config.get(b"rhg", b"ignored-extensions") {
647 // All extensions are to be ignored, nothing to do here
648 return Ok(());
649 }
650
646 let enabled: HashSet<&[u8]> = config
651 let enabled: HashSet<&[u8]> = config
647 .get_section_keys(b"extensions")
652 .get_section_keys(b"extensions")
648 .into_iter()
653 .into_iter()
@@ -391,3 +391,17 b' The `:required` extension suboptions are'
391 $ echo "*:required = yes" >> $HGRCPATH
391 $ echo "*:required = yes" >> $HGRCPATH
392 $ rhg files
392 $ rhg files
393 a
393 a
394
395 We can ignore all extensions at once
396
397 $ echo "[extensions]" >> $HGRCPATH
398 $ echo "thisextensionbetternotexist=" >> $HGRCPATH
399 $ echo "thisextensionbetternotexisteither=" >> $HGRCPATH
400 $ $NO_FALLBACK rhg files
401 unsupported feature: extensions: thisextensionbetternotexist, thisextensionbetternotexisteither (consider adding them to 'rhg.ignored-extensions' config)
402 [252]
403
404 $ echo "[rhg]" >> $HGRCPATH
405 $ echo "ignored-extensions=*" >> $HGRCPATH
406 $ $NO_FALLBACK rhg files
407 a
General Comments 0
You need to be logged in to leave comments. Login now