Handling if's with parenthesis

Giorgos Keramidas keramida at ceid.upatras.gr
Fri Dec 5 15:12:07 UTC 2008


On Fri, 05 Dec 2008 17:06:31 +0200, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:
> Then ediff-mode of GNU Emacs, running as a 3-way merge tool, shows three
> buffer windows that clearly mark (with colors) the following regions as
> parts of the file that include changes:
>
>    +-------------------------+     +-------------------------+
>    |int main() {             |     |int main() {             |
> => |    if (true)            |  => |    if (true) {          |
>    |        somefunc();      |     |        somefunc();      |
> => |}                        |  => |        somefunc2();     |
>    |                         |  => |    }                    |
>    |                         |     |}                        |
>    +-------------------------+     +-------------------------+
>
> The conflict resolution area may be a bit confusing in this case,
> because it shows:
>
>    +---------------------------------------------------------+
>    |int main() {                                             |
> => |    if (true)                                            |
>    |        somefunc();                                      |
> => |<<<<<<< variant A                                        |
> => |>>>>>>> variant B                                        |
> => |        somefunc2();                                     |
> => |    }                                                    |
> => |####### Ancestor                                         |
> => |    }                                                    |
> => |======= end                                              |
>    |}                                                        |
>    +---------------------------------------------------------+

The important detail here is, of course, as someone else pointer in the
same thread, that I have `premerge = False' for my ediff merge tool.
This lets the merge tool decide if I want to keep a change or not (at
the cost of doing even some trivial merges like CVS $Id$ lines with the
merge tool, instead of having them auto-resolved).




More information about the Mercurial mailing list