rust/hg-core/src/utils/files.rs
branchstable
changeset 51566 529a655874fb
parent 51120 532e74ad3ff6
equal deleted inserted replaced
51565:95c083d21ac6 51566:529a655874fb
   116     let mut dirs = Ancestors { next: Some(path) };
   116     let mut dirs = Ancestors { next: Some(path) };
   117     if !path.is_empty() {
   117     if !path.is_empty() {
   118         dirs.next(); // skip itself
   118         dirs.next(); // skip itself
   119     }
   119     }
   120     dirs
   120     dirs
       
   121 }
       
   122 
       
   123 pub fn dir_ancestors(path: &HgPath) -> Ancestors {
       
   124     Ancestors { next: Some(path) }
   121 }
   125 }
   122 
   126 
   123 /// Returns an iterator yielding ancestor directories of the given repository
   127 /// Returns an iterator yielding ancestor directories of the given repository
   124 /// path.
   128 /// path.
   125 ///
   129 ///