[darcs-devel] and a confusing add/renaming combination

David Roundy droundy at darcs.net
Sun May 8 03:25:14 PDT 2005


On Sun, May 08, 2005 at 12:52:54AM -0700, Tupshin Harper wrote:
> has this sequence of patches:
> move ./Autoconf.lhs ./Autoconf.lhs.in
> addfile ./Autoconf.lhs.in
> hunk ./Autoconf.lhs.in 1
> --snip---
> 
> And this is the first occurence of either Autoconf.lhs or
> Autoconf.lhs.in in the repository.
> 
> How is this possible? It appears that darcs handles this by ignoring the
> original move line (ignore move if source doesn't exist?), but I don't
> see how this sequence could have been created, and it would seem like an
> invalid thing to exist.

It dates beck from an old bug in darcs, which had seemed like a good idea
at the time.  It used to be that moves commuted with *all* filepatches,
even adds and removes.  This was a mistake, but it allowed changes like
this to sneak in.  So in this case, Peter probably first added
Autoconf.lhs, renamed it, and then recorded.  When the record sorted the
changes, it put the rename before the add.

It would be nice to have an option in optimize to weed out (or reorder)
such patches, but we don't yet have this, so darcs has to continue the old
behavior of ignoring moves of files that don't exist.
-- 
David Roundy
http://www.darcs.net




More information about the darcs-devel mailing list