[PATCH] followlines: join merge parents line ranges in blockdescendants() (issue5595)

Yuya Nishihara yuya at tcha.org
Thu Jul 6 10:20:03 EDT 2017


On Wed, 05 Jul 2017 14:31:36 +0200, Denis Laxalde wrote:
> # HG changeset patch
> # User Denis Laxalde <denis.laxalde at logilab.fr>
> # Date 1499255693 -7200
> #      Wed Jul 05 13:54:53 2017 +0200
> # Node ID 279d73fea8a821f2a87bb040feed7daf9e162f0d
> # Parent  5c9ad50fd62fbc2057ef7b44f921f22e7359af32
> # Available At http://hg.logilab.org/users/dlaxalde/hg
> #              hg pull http://hg.logilab.org/users/dlaxalde/hg -r 279d73fea8a8
> followlines: join merge parents line ranges in blockdescendants() (issue5595)
> 
> In blockdescendants(), we had an assertion when line range of a merge
> changeset was not consistent depending on which parent was considered for
> computation. For instance, this might occur when file content (in lookup
> range) is significantly different between parent branches of the merge as
> demonstrated in added tests (where we almost completely rewrite the "baz" file
> while also introducing similarities with its content in the other branch we
> later merge to).
> 
> Now, in such case, we combine line ranges from all parents by storing the
> envelope of both line ranges. This is conservative (the line range is
> extended, possibly unnecessarily) but at least this should avoid missing
> descendants with changes in a range that would fall in that of one parent but
> not in another one (the case of "baz: narrow change (2->2+)" changeset in
> tests).

Sounds good. Queued, thanks.


More information about the Mercurial-devel mailing list