[darcs-users] [patch35] Reduce scope of Darcs.Patch.Choices.pull... (and 1 more)

Kamil Dworakowski kamil at dworakowski.name
Tue Dec 29 13:15:09 UTC 2009

On Mon, Nov 2, 2009 at 4:21 PM, Petr Rockai <me at mornfall.net> wrote:
>> Sun Oct 11 19:09:47 BST 2009  Eric Kow <kowey at darcs.net>
>>   * Remove completely superfluous negTag mechanism.
>>   This change is really due to Kamil Dworakowski, who observed that pull_firsts
>>   returns all the InFirst patches along with the InMiddle patches they depend on
>>   without any tags.
> But I have my doubts about this. I mean, although pull_firsts does not care
> about the tag value in itself, it leaks the tags which are examined in other
> parts of the code for equality. I'll have to carefully go through all the code
> dealing with those tags to understand whether this is a good idea at all.

Eric asked me to comment here, though I can't add much more over what
I said in [1].

The negation originated in an old patch [2], in which it was not
leaking outside the pull_firsts function; only patches to be returned
as selected have their tags negated. Since then the signature of
pull_firsts changed, so that the tags are returned for both the
selected and not selected patches, whereas before the tags for the
selected patches where discarded. Whether since then some other part
of the code grew to rely on negating is not easy to check. This is
unlikely though. It didn't make sense when introduced, it is not
documented anywhere and there are no failing tests when it is removed.


[1] http://article.gmane.org/gmane.comp.version-control.darcs.user/21448
[2] darcs diff -u -p 'Add support for gui record.'

More information about the darcs-users mailing list