[darcs-users] darcs patch: Camel-case getLog and getDate exported b... (and 1 more)
kowey at darcs.net
Thu Sep 17 11:42:25 UTC 2009
On Thu, Sep 17, 2009 at 13:21:31 +0200, Lele Gaifax wrote:
> > hunk ./src/Darcs/Commands/Record.lhs 127
> > commit = command_stub "commit" commit_help commit_description record
> > file_exists :: Slurpy -> SubPath -> IO Bool
> > -file_exists s rp = do file <- doesFileExist fp
> > +file_exists s rp = do file <- doesFileExist fp
> > dir <- doesDirectoryExist fp
> > return (file || dir ||
> > slurp_hasfile (sp2fn rp) s ||
> Isn't this spurious?
Thanks for noticing this! This is one of those cases where using
darcs replace can give unintuitive output. Try this version,
where we just commute the hunk past the replace:
fileExists :: Slurpy -> SubPath -> IO Bool
-fileExists s rp = do file <- doesFileExist fp
+fileExists s rp = do file <- doesFileExist fp
dir <- doesDirectoryExist fp
return (file || dir ||
slurp_hasfile (sp2fn rp) s ||
Hopefully it becomes a little clearer why we have this hunk patch.
Whitespace-sensitive languages and token replacements...
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: Digital signature
More information about the darcs-users