[darcs-devel] [darcs #396] 'darcs record' should respect registered files

David Roundy droundy at darcs.net
Thu May 19 04:51:31 PDT 2005


On Thu, May 19, 2005 at 01:42:36PM +0200, Karel Gardas wrote:
> On Thu, 19 May 2005, David Roundy wrote:
> >The solution to this bug is simply to check whether the file existed in the
> >recorded repository.  I just sent in a bug fix for this.  But it would be
> >nice (as I mention in the bugfix email) to split this filtering business
> >into a separate module that'll also be used by whatsnew and revert.  And I
> >guess perhaps unrevert.
> 
> Are you OK to move it to FileSystem module, or do you rather like 
> something like FileCheck module?

It doesn't really seem appropriate to stick it in the FileSystem module,
since it involves accessing the pristine cache.  I'd lean more towards
putting it into the Repository module (not that that isn't big enough
already), since it more closely related to the am_in_repo function (which
provides the input to fix_filepath.

Perhaps moving am_in_repo, maybe_in_repo and not_in_repo into a new module
along with something like a new

filter_existing_filepath_arguments ::
    [DarcsArguments] -> [String] -> IO [FilePath]

which would do all the fix_file and checking that the files actually
exist?

> >I disagree.  There is a fundamental asymmetry between addition and
> >removal of files.  If a file is removed by a user, darcs can't help but
> >notice the fact, and the only reasonable response is to assume that the
> >user intended to remove the file.
> 
> Darcs can also complain about "corruped" user dir and so force users to
> properly do darcs remove X; rm X and so preserving the invariant
> presented in other email.

That seems like it would be confusing.

> Anyway, if you're ok with just non-existent files/dirs check, that's ok
> for me too.

All right.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list