equal
deleted
inserted
replaced
217 if let Some(formatted) = config.get_option(b"ui", b"formatted")? { |
217 if let Some(formatted) = config.get_option(b"ui", b"formatted")? { |
218 Ok(formatted) |
218 Ok(formatted) |
219 } else { |
219 } else { |
220 isatty(config) |
220 isatty(config) |
221 } |
221 } |
|
222 } |
|
223 |
|
224 pub enum RelativePaths { |
|
225 Legacy, |
|
226 Bool(bool), |
|
227 } |
|
228 |
|
229 pub fn relative_paths(config: &Config) -> Result<RelativePaths, HgError> { |
|
230 Ok(match config.get(b"ui", b"relative-paths") { |
|
231 None | Some(b"legacy") => RelativePaths::Legacy, |
|
232 _ => RelativePaths::Bool(config.get_bool(b"ui", b"relative-paths")?), |
|
233 }) |
222 } |
234 } |
223 |
235 |
224 fn isatty(config: &Config) -> Result<bool, HgError> { |
236 fn isatty(config: &Config) -> Result<bool, HgError> { |
225 Ok(if config.get_bool(b"ui", b"nontty")? { |
237 Ok(if config.get_bool(b"ui", b"nontty")? { |
226 false |
238 false |