[darcs-users] Various issues

David Roundy droundy at abridgegame.org
Sun Jul 20 10:32:06 UTC 2003


On Sun, Jul 20, 2003 at 12:47:10AM -0500, David Phillips wrote:
> I just found darcs today and have been playing with it.  I am very
> impressed!

Thanks!  :)

> I'd like to see support for "black box" binary files, as mentioned before on
> the mailing list.  This would be very useful, for example, when keeping web
> sites in a repository.

Well, you're in luck.  Yesterday I pushed the change to support binary
patches.  There isn't yet a way to actually create binary patches, but I
figure I'll work on that maybe today and tomorrow (unless I get distracted
by using mmap for faster IO).

The plan is to support a "binaries" file which will be like the boring
file, only will specify regexps for files that should be treated as
binaries.

> The "add" command appears to only respect the "boring" file when used with
> the --recursive option.  I didn't see this documented anywhere.  It would be
> useful always respect the "boring" file, unless an option such as --force is
> specified.  That would keep one from accidentally adding the _darcs
> directory by running "darcs add *".  Perhaps the _darcs directory should
> always be ignored?

You are right.  _darcs should definitely always be ignored so I've created
a special case for it along with ".." and ".".  I've implemented your
suggestion, except that I decided to call the flag "--boring" rather than
"--force" as force might be a bit unclear.  Of course, so might --boring,
but I think --boring is more likely to leave you confused than thinking you
understand it when you didn't.  Of course, I could change it to
--dont-skip-boring...

(I haven't yet pushed this to the main repo, darcs is still running the
test as I record it... but it should be there soon.)

> For "remove", the manual states, ``Otherwise just delete the file or
> directory, and darcs will notice that it has been removed.''  This doesn't
> appear to reflect darcs' current behavior:
> 
> $ darcs --version
> 0.9.11
> $ darcs inittree
> Successfully initialized tree!
> $ echo hello > foo
> $ darcs add foo
> $ darcs record -a -m new
> There is test.
> Finished recording patch 'new'
> $ rm foo
> $ darcs whatsnew
> No changes!

Hmmm.  This is an unusual bug.  Sometimes whatsnew seems to show the
removed file, and sometimes it doesn't (I haven't tested much yet).  But
even when whatsnew doesn't show the removal, record (and presumably revert)
seems to see it... I shall look into this more.

> What would I do if I accidentally deleted a file?

It seems that record notices the file missing even if whatsnew doesn't, so
you probably could undo it with revert.  If that failed, you could either
copy the file from the _darcs/current directory or just use darcs get to
get a new copy of the repo.  If you do this locally it'll make hard links
of the patches, so it'll be pretty fast.
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list