# HG changeset patch # User Boris Feld # Date 2018-04-18 13:04:12 # Node ID a07fab68621f5e819a948d1a56f4a95329913c50 # Parent 33d26f7bd6ca10e85cd189a9a4e2c8396f92b379 notify: use changelog API to iterate over revision number (issue5821) This will avoid iterating over filtered revision. diff --git a/hgext/notify.py b/hgext/notify.py --- a/hgext/notify.py +++ b/hgext/notify.py @@ -469,8 +469,7 @@ def hook(ui, repo, hooktype, node=None, count = 0 author = '' if hooktype == 'changegroup' or hooktype == 'outgoing': - start, end = ctx.rev(), len(repo) - for rev in xrange(start, end): + for rev in repo.changelog.revs(start=ctx.rev()): if n.node(repo[rev]): count += 1 if not author: