[issue1914] notify extension gets diff/diffstat wrong

Igor Lautar bugs at mercurial.selenic.com
Thu Nov 19 08:37:39 CST 2009

New submission from Igor Lautar <igor.lautar at gmail.com>:

I've noticed notify extension giving more diff output as one would expect.

- having it as changegroup hook
- pushing changes to 2 or more branches in same push

When installed as changegroup, notify extension does only one diff, from 
start of changegroup to 'tip'.
If one push contains changesets from multiple branches, first one being on 
one branch and last on another, notify will show diff (and diffstat) of 
changes between those branches as well, and not only changes being pushed.
This is wrong, making diff/diffstat unusable in such cases as it has no 
value (even confuses commiters).

So, to fix it, one would need to do something like:
- find all changes per branch that are linear in history
 - as multiple changes can be made to same (named) branch that end with 
different heads
- do diff/diffstat per such changeset found

Alternatively, one could do one diff/diffstat per change and not one for 
whole changegroup.

I might make a shot at it this weekend, anything else that I should keep in 
mind? Thinking about it, one diff per change sounds better.

messages: 11022
nosy: igorl
priority: bug
status: unread
title: notify extension gets diff/diffstat wrong

Mercurial issue tracker <bugs at mercurial.selenic.com>

More information about the Mercurial-devel mailing list