hg help log + hg help diff + hg help revsets + hg help templating hg help dates + bash
- Date of first commit of last commit
The initial commit always has a turn of 0, the last is always a hint
hg log -r 0 --template "{date|date}\n"
hg log -r tip --template "{date|date}\n"
- Number of days worked: the number of days with a non-zero number of commits
hg log --template "{date(date,'%d%m%y')}\n" | sort -u | wc -l
- Daily activity summary - just the number of commits
hg log -r "date('YYYY-MM-DD')" --template "{.}\n" | wc -l
number of rows changed (first ugly iteration of the project: "feci quod potui, faciant meliora potentes")
hg diff --stat -r "first(date('YYYY-MM-DD'))" -r "last(date('YYYY-MM-DD'))"
An example of the output of such a diff
404.php | 4 +- comments.php | 14 +----- footer.php | 2 +- functions.php | 24 +++++++++- header.php | 2 +- readme.txt | 38 +++++++++++++++++ screenshot.png | Bin search.php | 12 +++- sidebar.php | 45 ++------------------ style.css | 121 +++++++++++++++++++++++++++---------------------------- 10 files changed, 139 insertions(+), 123 deletions(-)
Note: YYYY-MM-DD is a placeholder, you need to write the current date in this format to the command
Note 2: Less than an hour to prepare and test the results.
source share