[PATCH 2 of 3 STABLE] notify: access the initial revision on an unfiltered repository (issue5821)

Boris Feld boris.feld at octobus.net
Thu Apr 19 05:17:08 EDT 2018


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1524056712 -7200
#      Wed Apr 18 15:05:12 2018 +0200
# Branch stable
# Node ID 39ad6c3d676f66421c56adcedffabd50fc5a0137
# Parent  e4f85af0d409055650ee05d18596532bd08747d4
# EXP-Topic issue5821
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 39ad6c3d676f
notify: access the initial revision on an unfiltered repository (issue5821)

This should avoid crash when the first revision pushed end up being hidden.

diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -455,7 +455,7 @@ def hook(ui, repo, hooktype, node=None, 
     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)


More information about the Mercurial-devel mailing list