How to get C function names in diffs?

Mads Kiilerich mads at kiilerich.com
Fri Aug 26 11:30:52 UTC 2011


On 08/26/2011 12:37 PM, Peter Weilbacher wrote:
> In my Hg config I set
>     [defaults]
>     diff=-p

(defaults are deprecated. Don't use them.)

> (equivalent to |diff --show-c-function|) to see function names of my code in the
> patches. For |hg diff| itself this works nicely, but elsewhere Hg
> creates/displays patches this has no effect. My main cases would be to get the
> function names displayed are in the patches that Mq creates (i.e. .hg/patches/*)
> and in the webpage output that I get from |hg serve|.

Setting [diff] showfunc might work all the places you want - see 'hg 
help config'.

/Mads



More information about the Mercurial mailing list