[darcs-users] More confusion

David Roundy droundy at abridgegame.org
Sat May 8 11:04:49 UTC 2004


On Wed, May 05, 2004 at 07:09:08PM -0700, Adam Megacz wrote:
> 
> Man, I'm still having a hard time wrapping my head around some of this.
> 
> The following command sequence (and responses) make no sense... when I
> rollback, darcs should either undo (in the working directory) the fact
> that I created the file (in which case the file should disappear) or
> else it should not (in which case me changing the file should count as
> a recordable change).
> 
> Is this confusing to anybody else?

I've decided that this was a bug.  If you had run darcs replace prior to
unrolling the patch, you would have been prevented from unrolling the
patch, which is silly (albeit consistent).  So now the unroll will leave
the file in the repo, and it will still be added, so

% darcs whatsnew 
{
addfile ./foo
}

Thanks for mentioning this... I hadn't realized that rollback didn't deal
with "pending" changes (i.e. things like adds and replaces that need to be
remembered before being recorded) properly.

The old behavior (old, since I just fixed it, although I haven't yet
recorded the change) was even more annoying in the context of a darcs
replace.  If you rollback a darcs replace, you *really* want the replace to
be in your pending changes, so you can revert it if you want.  Instead,
darcs would just forget about it, leaving you with a (potentially) huge
number of hunk changes, which might be intermingled with changes you
actually want.  :(
-- 
David Roundy
http://www.abridgegame.org




More information about the darcs-users mailing list