Show More
@@ -687,13 +687,18 b' fn check_extensions(config: &Config) -> ' | |||||
687 | } |
|
687 | } | |
688 |
|
688 | |||
689 | let enabled: HashSet<&[u8]> = config |
|
689 | let enabled: HashSet<&[u8]> = config | |
690 |
. |
|
690 | .iter_section(b"extensions") | |
691 | .into_iter() |
|
691 | .filter_map(|(extension, value)| { | |
692 | .map(|extension| { |
|
692 | if value == b"!" { | |
|
693 | // Filter out disabled extensions | |||
|
694 | return None; | |||
|
695 | } | |||
693 | // Ignore extension suboptions. Only `required` exists for now. |
|
696 | // Ignore extension suboptions. Only `required` exists for now. | |
694 | // `rhg` either supports an extension or doesn't, so it doesn't |
|
697 | // `rhg` either supports an extension or doesn't, so it doesn't | |
695 | // make sense to consider the loading of an extension. |
|
698 | // make sense to consider the loading of an extension. | |
696 | extension.split_2(b':').unwrap_or((extension, b"")).0 |
|
699 | let actual_extension = | |
|
700 | extension.split_2(b':').unwrap_or((extension, b"")).0; | |||
|
701 | Some(actual_extension) | |||
697 | }) |
|
702 | }) | |
698 | .collect(); |
|
703 | .collect(); | |
699 |
|
704 |
@@ -2157,6 +2157,8 b' test -u/-k for problematic encoding' | |||||
2157 | ... '''.encode('utf-8')) and None |
|
2157 | ... '''.encode('utf-8')) and None | |
2158 | $ sh < setup.sh |
|
2158 | $ sh < setup.sh | |
2159 |
|
2159 | |||
|
2160 | #if no-rhg | |||
|
2161 | ||||
2160 | test in problematic encoding |
|
2162 | test in problematic encoding | |
2161 | >>> with open('test.sh', 'wb') as f: |
|
2163 | >>> with open('test.sh', 'wb') as f: | |
2162 | ... f.write(u''' |
|
2164 | ... f.write(u''' | |
@@ -2179,6 +2181,8 b' test in problematic encoding' | |||||
2179 | 3 |
|
2181 | 3 | |
2180 | 1 |
|
2182 | 1 | |
2181 |
|
2183 | |||
|
2184 | #endif | |||
|
2185 | ||||
2182 | $ cd .. |
|
2186 | $ cd .. | |
2183 |
|
2187 | |||
2184 | test hg log on non-existent files and on directories |
|
2188 | test hg log on non-existent files and on directories |
General Comments 0
You need to be logged in to leave comments.
Login now