diff -r 55987fc8aba1 -r 3e47a40d7a7a mercurial/context.py --- a/mercurial/context.py Fri Apr 14 14:09:26 2017 +0200 +++ b/mercurial/context.py Fri Apr 14 14:25:06 2017 +0200 @@ -1212,6 +1212,16 @@ """Yield descendants of `fctx` with respect to the block of lines within `fromline`-`toline` range. """ + # First possibly yield 'fctx' if it has changes in range with respect to + # its parents. + try: + c, linerange1 = next(blockancestors(fctx, fromline, toline)) + except StopIteration: + pass + else: + if c == fctx: + yield c, linerange1 + diffopts = patch.diffopts(fctx._repo.ui) fl = fctx.filelog() seen = {fctx.filerev(): (fctx, (fromline, toline))}