diff: add --stat for diffstat output
diff/qdiff --stat invokes patch.diffstat() on the diff output.
When in interactive mode, the output's maximum width is determined by the
terminal's width.
diffstat: print 0 instead of nothing for 0 adds or removes
This is in line with how the stock diffstat behaves when processing a
single diff with no line modifications (like a binary diff).
cmdutil: minor refactoring of changeset_printer._show
- use ctx.branch() instead of directly accessing the extra field "branch"
- move definitions of locals ('extra' and 'branch') down to where they
are used
commands: search for translated version of "DEPRECATED"
The option description is already translated at this point, so we must
search for a translation of "DEPRECATED".
convert: document parent order in splicemap help (
issue1764)
util: use sys.argv[0] if $HG is unset and 'hg' is not in PATH
This is necessary when the executable name is not 'hg'. For example,
if your system-wide mercurial is name 'hgs', sys.argv[0] is more
accurate than 'hg'.