##// END OF EJS Templates
rhg: check that .hg/requires is ASCII...
Simon Sapin -
r46550:f5d62f4d default
parent child Browse files
Show More
@@ -24,7 +24,7 b' fn parse(bytes: &[u8]) -> Result<Vec<Str'
24 .map(|line| {
24 .map(|line| {
25 // Python uses Unicode `str.isalnum` but feature names are all
25 // Python uses Unicode `str.isalnum` but feature names are all
26 // ASCII
26 // ASCII
27 if line[0].is_ascii_alphanumeric() {
27 if line[0].is_ascii_alphanumeric() && line.is_ascii() {
28 Ok(String::from_utf8(line.into()).unwrap())
28 Ok(String::from_utf8(line.into()).unwrap())
29 } else {
29 } else {
30 Err(())
30 Err(())
@@ -140,3 +140,8 b' Requirements'
140 sparserevlog
140 sparserevlog
141 store
141 store
142 indoor-pool
142 indoor-pool
143
144 $ echo -e '\xFF' >> .hg/requires
145 $ rhg debugrequirements
146 abort: .hg/requires is corrupted
147 [255]
General Comments 0
You need to be logged in to leave comments. Login now