[darcs-users] [patch368] Fix for issue1932
dastapov at gmail.com
Wed Sep 1 18:20:14 UTC 2010
On Wed, Sep 1, 2010 at 6:39 PM, Florent Becker <bugs at darcs.net> wrote:
> Florent Becker <florent.becker at ens-lyon.org> added the comment:
> Why exchange the import of fromJust for the inclusion of impossible? I
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the darcs-users