rust/rhg/src/ui.rs
changeset 51117 532e74ad3ff6
parent 50536 74e4dbb0fcd5
child 52303 22d24f6d6411
equal deleted inserted replaced
51116:d58e754f2db0 51117:532e74ad3ff6
   249 ) -> Vec<u8> {
   249 ) -> Vec<u8> {
   250     match warning {
   250     match warning {
   251         PatternFileWarning::InvalidSyntax(path, syntax) => format_bytes!(
   251         PatternFileWarning::InvalidSyntax(path, syntax) => format_bytes!(
   252             b"{}: ignoring invalid syntax '{}'\n",
   252             b"{}: ignoring invalid syntax '{}'\n",
   253             get_bytes_from_path(path),
   253             get_bytes_from_path(path),
   254             &*syntax
   254             syntax
   255         ),
   255         ),
   256         PatternFileWarning::NoSuchFile(path) => {
   256         PatternFileWarning::NoSuchFile(path) => {
   257             let path = if let Ok(relative) =
   257             let path = if let Ok(relative) =
   258                 path.strip_prefix(repo.working_directory_path())
   258                 path.strip_prefix(repo.working_directory_path())
   259             {
   259             {
   260                 relative
   260                 relative
   261             } else {
   261             } else {
   262                 &*path
   262                 path
   263             };
   263             };
   264             format_bytes!(
   264             format_bytes!(
   265                 b"skipping unreadable pattern file '{}': \
   265                 b"skipping unreadable pattern file '{}': \
   266                     No such file or directory\n",
   266                     No such file or directory\n",
   267                 get_bytes_from_path(path),
   267                 get_bytes_from_path(path),