Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

List SIZE of mercurial changesets?

Looking to quantify how much change happened in each changeset. Any quick way to list maybe kb diff between two revisions?

like image 811
loneboat Avatar asked Jun 08 '11 20:06

loneboat


2 Answers

I had the same thought as @shambulator yesterday! So I've added ability to print delta size in bytes as a part of --diffstat output from my somewhat long and clean patch.py utility.

wget https://raw.githubusercontent.com/techtonik/python-patch/master/patch.py
hg diff -c tip | python patch.py --diffstat --
 codereview/views.py | 28 ++++++++++++++++++++++++++++
 index.yaml          | 10 ++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-), +1267 bytes

UPD: Thanks to @Gili and @mforbes there is now a ticket for Mercurial
https://bz.mercurial-scm.org/show_bug.cgi?id=4245

like image 170
anatoly techtonik Avatar answered Nov 09 '22 10:11

anatoly techtonik


hg log --stat is the command you're after. See this example:

$ hg log --stat

changeset:   12431:56e146c7beef
user:        flast
date:        Wed Jun 08 16:12:54 2011 +1000
summary:     Fix the frobulate to frob the knob correctly on tuesdays.

 path/to/src/frob/interface.py       |  29 ++++++++++++++++++++---------
 path/to/tests/systest_frob.py       |  14 ++++++++++++++
 2 files changed, 34 insertions(+), 9 deletions(-)
like image 40
Jerub Avatar answered Nov 09 '22 08:11

Jerub