changeset 37793:a07fab68621f stable

notify: use changelog API to iterate over revision number (issue5821) This will avoid iterating over filtered revision.
author Boris Feld <boris.feld@octobus.net>
date Wed, 18 Apr 2018 15:04:12 +0200
parents 33d26f7bd6ca
children 04d648b53e3e
files hgext/notify.py
diffstat 1 files changed, 1 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/notify.py	Thu Apr 19 00:55:36 2018 -0400
+++ b/hgext/notify.py	Wed Apr 18 15:04:12 2018 +0200
@@ -469,8 +469,7 @@
     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: