[PATCH 1 of 3 v3] mpatch: shuffle stuff around so it's easier to make a cffi version of mpatch

Yuya Nishihara yuya at tcha.org
Thu Jul 7 09:29:27 EDT 2016


On Thu, 7 Jul 2016 13:34:51 +0100, Jun Wu wrote:
> Usually, the first patch will be moving code without changing logic
> (including renaming a variable). The second patch will be changing lines
> without moving code. The point is to make "diff" output more friendly to
> review. See 616ea95c8f11 as an example. It's not the exactly the same with
> your case but you can get the idea.

You can't move the code first because this patch splits CPython interface
from the core logic. Instead, this could be:

 1. factor out core functions (which have no Py* function calls)
 2. do trivial renames
 3. extract mpatch.h
 4. copy mpatch.c to mpatch_module.c and remove the core functions from
    mpatch_module.c

That will greatly help reviewing this patch because (1) will have no noise.
Anyway, I'm going to do that by myself to understand what's changed.


More information about the Mercurial-devel mailing list