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

login
register
mail settings
Submitter Boris Feld
Date April 19, 2018, 9:17 a.m.
Message ID <39ad6c3d676f66421c56.1524129428@FB>
Download mbox | patch
Permalink /patch/31195/
State Accepted
Headers show

Comments

Boris Feld - April 19, 2018, 9:17 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@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.

Patch

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)