Hi all, On Sunday 09 November 2008 10:43:57 you wrote: > Reinier Lamers <[EMAIL PROTECTED]> writes: > > hunk ./src/Darcs/Diff.lhs 135 > > + > > +make_nonoverlapping_path_set :: [FilePath] -> [FilePath] > > +make_nonoverlapping_path_set = map unbreakup . delete_overlapping . map > > breakup . sort + where > > + delete_overlapping :: [[FilePath]] -> [[FilePath]] > > + delete_overlapping (p1:p2:ps) = if p1 `isPrefixOf` p2 > > + then delete_overlapping (p1:ps) > > + else p1 : delete_overlapping > > (p2:ps) + delete_overlapping ps = ps > > + unbreakup = concat . intersperse "/" > > #endif > > Now, this assumes that prefixes always sort first, which is hopefully true > (and trying it in ghci seems to confirm that). Is there a possibility that > the paths are not canonical? We need to ensure that nothing like > "foo/../bar" ever gets fed into this function (!). This might actually be a > weak spot, although there's a call to fix paths somewhere quite high in the > stack (in beginning of most commands, I believe). It might be worth adding > a test checking something like "darcs whatsnew foo/. foo/bar/..".
I wanted to tell you it's okay because the haddock comment of get_unrecorded_in_files also state that you may never pass in non-canonical paths. However, then I saw: > > respectively. +-- | The unsafeDiffAtPaths function calls diff_at_path for > > a set of files and +-- returns all changes to those files. It does > > *not* explore the given paths +-- recursively. Where a plainly false remark has crept into my haddock (namely, that unsafeDiffAtPaths does not diff recursively. So if this patch bundle gets accepted I'll immediately submit a small patch to fix that. Reinier _______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
