Handling if's with parenthesis
Mads Kiilerich
mads at kiilerich.com
Fri Dec 5 13:54:21 UTC 2008
E.L.K. wrote:
> Now we have next contents of this file:
> int main(){
>
> if (true)
> somefunc();
> somefunc2();
>
>
>
> }
>
> Which is clearly not what was intended.
>
> How thigs like that should be handled?
>
The obvious solution is to use a programming language without braces and
with proper semantics of indentation ;-)
The behaviour you see is works-as-designed - see
http://www.selenic.com/mercurial/bts/issue1295 msg7160. Your case is a
variant of the example in msg7101.
You can fix that by disabling premerge for your merge tool - see
http://www.selenic.com/mercurial/wiki/index.cgi/MergeToolConfiguration .
/Mads
More information about the Mercurial
mailing list