[darcs-users] bug or inconsistency in darcs replace

David Roundy droundy at abridgegame.org
Sun Mar 28 13:10:12 UTC 2004

On Sun, Mar 28, 2004 at 02:37:47PM +0200, Tommy Pettersson wrote:
> David Roundy wrote:
> > Having heard the limitations (at least with how I would actually implement
> > it), do you still think a --force option would be nice? It wouldn't be very
> > hard to implement... the main question is whether it would end up leading
> > to confusion.
> At present I can do:
>   $ cat a
>   foo
>   bar
>   $ darcs replace foo gaz a; cat a
>   gaz
>   bar
>   $ [manually edit `bar' to `gaz']; cat a
>   gaz
>   gaz
>   $darcs whatsnew
>   {
>   hunk ./a 2
>   -bar
>   +foo
>   replace ./a [A-Za-z_0-9] foo gaz
>   }
>   $ [revert only the replace patch]; cat a
>   foo
>   foo
> so this is already an "issue".  With enough understanding,
> best thing would of course be if replace was easy.

Hmmm.  Yes, it does seem that adding the --force option (with perhaps a
different name) wouldn't be too bad, and it certainly would be convenient.
I think I'll do it when I get time.

> By the way, if I unrevert a reverted replace patch it turns
> into ordinary hunks.  Is that a bug?

Yes it is! It seems that I wrote unrevert before I created the
"sift_for_pending" function which is needed for this purpose...  Thanks for
mentioning this!  I've already got a fix in, and the problem didn't just
affect replace, it also affected adds, removes and moves.
David Roundy

More information about the darcs-users mailing list