[PATCH] lets be able to show diffstat along with diff

Alecs King alecsk at gmail.com
Wed Aug 11 21:41:35 CDT 2010


On Wed, Aug 11, 2010 at 05:00:04PM -0400, Greg Ward wrote:
> On Wed, Aug 11, 2010 at 10:52 AM, Alecs King <alecsk at gmail.com> wrote:
> > Currently, we can only show diff _or_ diffstat.  Sometimes it's better
> > if we can show both: diffstat along with the actual diff.
> 
> Is it really so horrible to run
> 
>   hg diff --stat ; hg diff

No, it's not, in this particular scenario.  But things can become
awkward if you have a few options (e.g. -r 1000 -r 10000 -X dummy) to
diff -- you have to repeat them all twice.  Things get even worse if you
run 'hg log' like that -- you get separate stats and diffs.  And
technically, two separate commands tend to be slower -- same computation
unnecessarily recalculated.  Separate commands are not working well with
extensions like pager or color -- only the last one's output gets paged
or colored.

So the patch is not made because it's horrible to do 'hg diff --stat; hg
diff'.  It's just it'll be better if we can do that in a single hg
command -- groups relevant info together and works smoothly with
extensions like pager or color.  A side effect is that git refugees will
feel homey -- but that's not the primary reason in the first place.

It just makes life easier to break the mutually exclusive limitation of
stat and diff.

Regards,

-- 
Alecs King


More information about the Mercurial-devel mailing list