rust/rhg/src/commands/status.rs
changeset 48467 0c408831b2f1
parent 48454 473af5cbc209
child 48471 b005d07ded7d
equal deleted inserted replaced
48466:bf2738e03e96 48467:0c408831b2f1
   235     )?;
   235     )?;
   236     if !pattern_warnings.is_empty() {
   236     if !pattern_warnings.is_empty() {
   237         warn!("Pattern warnings: {:?}", &pattern_warnings);
   237         warn!("Pattern warnings: {:?}", &pattern_warnings);
   238     }
   238     }
   239 
   239 
   240     if !ds_status.bad.is_empty() {
   240     for (path, error) in ds_status.bad {
   241         warn!("Bad matches {:?}", &(ds_status.bad))
   241         let error = match error {
       
   242             hg::BadMatch::OsError(code) => {
       
   243                 std::io::Error::from_raw_os_error(code).to_string()
       
   244             }
       
   245             hg::BadMatch::BadType(ty) => {
       
   246                 format!("unsupported file type (type is {})", ty)
       
   247             }
       
   248         };
       
   249         ui.write_stderr(&format_bytes!(
       
   250             b"{}: {}\n",
       
   251             path.as_bytes(),
       
   252             error.as_bytes()
       
   253         ))?
   242     }
   254     }
   243     if !ds_status.unsure.is_empty() {
   255     if !ds_status.unsure.is_empty() {
   244         info!(
   256         info!(
   245             "Files to be rechecked by retrieval from filelog: {:?}",
   257             "Files to be rechecked by retrieval from filelog: {:?}",
   246             ds_status.unsure.iter().map(|s| &s.path).collect::<Vec<_>>()
   258             ds_status.unsure.iter().map(|s| &s.path).collect::<Vec<_>>()