notify: access the initial revision on an unfiltered repository (issue5821) stable
authorBoris Feld <boris.feld@octobus.net>
Wed, 18 Apr 2018 15:05:12 +0200
branchstable
changeset 37794 04d648b53e3e
parent 37793 a07fab68621f
child 37795 68748c2c761b
notify: access the initial revision on an unfiltered repository (issue5821) This should avoid crash when the first revision pushed end up being hidden.
hgext/notify.py
--- a/hgext/notify.py	Wed Apr 18 15:04:12 2018 +0200
+++ b/hgext/notify.py	Wed Apr 18 15:05:12 2018 +0200
@@ -455,7 +455,7 @@
     changegroup. else send one email per changeset.'''
 
     n = notifier(ui, repo, hooktype)
-    ctx = repo[node]
+    ctx = repo.unfiltered()[node]
 
     if not n.subs:
         ui.debug('notify: no subscribers to repository %s\n' % n.root)