> Fri Sep 12 15:24:58 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>   * Add DarcsOptAbsPathOption for options with optional path argument.

> Fri Sep 12 16:05:16 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>   * Make '--output-auto-name' accept optional directory argument.

> Fri Sep 12 16:22:23 MSD 2008  Dmitry Kurochkin <[EMAIL PROTECTED]>
>   * Spaces in Darcs.Commands.Send module.


> hunk ./src/Darcs/Arguments.lhs 1148
>  option_latex (DarcsAbsPathOption a b _ arg h) =
>      show_short_options a ++
>      show_long_options (map (++(" "++arg)) b) ++ latex_help h ++ "\\\\"
> +option_latex (DarcsOptAbsPathOption a b _ _ arg h) =
> +    show_short_options a ++
> +    show_long_options (map (++(" "++arg)) b) ++ latex_help h ++ "\\\\"
>  option_latex (DarcsMultipleChoiceOption os) =
>      unlines (map option_latex os)

It seems like the help should probably distinguish optional arguments
from required arguments somehow, like --in-place[=SUFFIX] (example
from the sed manpage).

>  \begin{code}
> -get_output :: [DarcsFlag] -> Maybe AbsolutePathOrStd
> -get_output (Output a:_) = return a
> -get_output (_:flags) = get_output flags
> -get_output [] = Nothing
> +get_output :: [DarcsFlag] -> FilePath -> Maybe AbsolutePathOrStd
> +get_output (Output a:_) _ = return a
> +get_output (OutputAutoName a:_) f = return $ makeAbsoluteOrStd a f

This would be a good place to use the /- operator that isn't (yet)
exported from RepoPath, since we know that f is a simple relative path
(i.e. a SubPath).  But first, that operator would need to be
considerably cleaned up.  (Just mentioning this for future reference,
and other readers who might be interested in doing this.)

On the whole, the code looks good, with the sole exception of the
--help message mentioned above (which doesn't seem like a stopper to
me).  So it's going in.  Thanks!

David
_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to