hg diff on a modified line
Paul Boddie
paul.boddie at biotek.uio.no
Fri Sep 21 11:56:30 UTC 2012
On 21/09/12 13:35, praveen_m86 wrote:
> Hello All,
>
> If I am modifying a line in a tracked file and run hg diff,
> the output is as if i have removed the line and added a new line. Y is it so
> ? Is there any option to display that particular change just as modified
> line ?
>
> e.g
>
> hg diff Hello.py
>
> -from app.test.method import *
> +from app.test.methods import *
Are you looking for something like this...?
| from app.test.methods import *
That would be similar to the notation used by programs like diff when
using side-by-side mode, but then the whole point of that mode is to
collapse each set of changes whilst retaining the before-and-after
overview. Here, you would just get to see the changed version, which
wouldn't always be appropriate.
I imagine that you could do this with templating, but I'd have to leave
it to others to propose a concrete solution.
Paul
More information about the Mercurial
mailing list