On Wed, Sep 1, 2010 at 6:39 PM, Florent Becker <[email protected]> wrote:
> > Florent Becker <[email protected]> added the comment: > > > Why exchange the import of fromJust for the inclusion of impossible? I > don't > see the point. > So that definition of "fromMaybe" from "impossible.h" would be used. This would simplify detection of the similar bugs in the future. If that include was here in the first place, then this bug would have manifested itself with the useful error message (complete with module name and line number), and not with "fromJust: Nothing". As far as I can see, this is a widespread practice (I've grepped for '#include "impossible.h" to confirm this). > > >+isRelative f = FP.isRelative f > > > > isAbsolute :: String -> Bool > > isAbsolute "" = bug "isAbsolute called with empty filename" > >hunk ./src/Darcs/URL.hs 66 > >-isAbsolute f = isFile f && (not $ isRelative f) > >+isAbsolute f = FP.isAbsolute f > > > We are now using the stdlib isRelative and isAbsolute. We still have > isAbsolute = not . isRelative . > I'm not sure that I understand the question (if there is any). We still have : > > isSsh :: String -> Bool > isSsh s = not (isFile s || isUrl s) > > This means (IIUC) that on windows, trying to use a "special" filename > such as "prn" would try to do an "ssh prn". I'm applying this anyway, > but we should give some other error message ("darcs pull prn" --> "no > route to host prn" would be a bit puzzling). Can you do that in a > followup patch? > Yes. I'm going to produce a unit test module for RepoPath & URL first, though, to reduce a chance of nasty regression. -- Dmitry Astapov
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
