[darcs-users] [patch178] Resolve issue 1397: distinguish between "no arguments"...
Trent W. Buck
twb at cybersource.com.au
Tue Mar 16 05:03:34 UTC 2010
Alexey Levan <bugs at darcs.net> writes:
> So, how do we fix all this mess? I propose following:
0. Make sure there are comprehensive regression tests for these
issues, which fail now and succeed after (3).
> 1. In Darcs/Arguments.lhs, create function 'maybeFixSubPaths ::
> [DarcsFlag] -> [FilePath] -> IO [Maybe SubPaths]', which maps invalid
> paths to Nothing.
> 2. fixSubPaths gets implemented in terms of maybeFixSubPaths:
> fixSubPaths flags fs = catMaybes <$> maybeFixSubPaths flags fs
> 3. In each command that takes filenames as arguments, implement
> commands with different semantics (such as 'darcs changes' and 'darcs
> changes [args]') as different functions, and pass them already checked
> arguments, doing all error handling before that. Here's example draft
> for darcs move:
More information about the darcs-users
mailing list