[darcs-devel] [patch1931] WIP: remove isInverted from PatchInfo

Ganesh Sittampalam bugs at darcs.net
Sun Sep 22 08:13:18 UTC 2019


Ganesh Sittampalam <ganesh at earth.li> added the comment:

So rollback did indeed create inverted patches in the past and there are
some in the history of darcs itself - just search for "UNDO" in the
darcs changes output to find them.

In fact in this patch I introduced the logic to support commuting a
RebaseName with an inverted Named:

patch 465ce49a25f8b19f6cecef87217b48c40668e2dd
Author: Ganesh Sittampalam <ganesh at earth.li>
Date:   Mon Aug 27 19:12:02 GMT Summer Time 2012
  * don't insist on all patches in a Named having the same polarity
  Historic rollback patches wrote out inverted names, although
  modern darcs doesn't do this (so perhaps we could insist on this for
  v2 patches?)

The current behaviour of rollback was introduced in 2008:

patch 03b02776a5be47803d1f5a4cff944c295300a7b9
Author: David Roundy <droundy at darcs.net>
Date:   Wed Jan 16 20:36:44 GMT Standard Time 2008
  * reimplement rollback.

Maybe we can continue to have the flag, perhaps renamed to
legacyInverted, so we can preserve hashes and any other global
invariants we need to, but not treat it as really inverting the
PatchInfo for internal purposes? I guess that even v2 patches do need to
support it as they must have been converted as-is.

Regardless, I will add a test to make sure we catch any future attempts
to totally remove this functionality. I should have done that in 2012.

> I have noticed your (conservative) choice and I liked it. It doesn't
> cost us anything (except a small comment in the code) and it keeps
> full compatibility. Why do you think we should remove it?

My main thought was that people consuming the XML then need to consider
its existence and decide what to do with it.

__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1931>
__________________________________


More information about the darcs-devel mailing list