[PATCH V2] patch: rewrite reversehunks (issue5337)

Martin von Zweigbergk martinvonz at google.com
Wed Jun 21 03:07:49 EDT 2017


On Tue, Jun 20, 2017 at 11:23 PM, Jun Wu <quark at fb.com> wrote:
> # HG changeset patch
> # User Jun Wu <quark at fb.com>
> # Date 1498026158 25200
> #      Tue Jun 20 23:22:38 2017 -0700
> # Node ID f54272510c4ec915bc13b1b9732d148cd1decdd0
> # Parent  0ce2cbebd74964ffe61e79de8941461bccc9371b
> # Available At https://bitbucket.org/quark-zju/hg-draft
> #              hg pull https://bitbucket.org/quark-zju/hg-draft -r f54272510c4e
> patch: rewrite reversehunks (issue5337)

I've run into that issue many times (until I learned to work around
it), so big thanks for fixing it.

>
> The old reversehunks code accesses "crecord.uihunk._hunk", which is the raw
> recordhunk without crecord selection information, therefore "revert -i"
> cannot revert individual lines, aka. issue5337.

Ooh, that was what was going on... Thanks for explaining. The examples
in the footnotes were very helpful too.

It's getting late for me, so I'll have to finish the review tomorrow.


More information about the Mercurial-devel mailing list