Patchwork [3,of,3,STABLE] notify: only notify for non-filtered revision

login
register
mail settings
Submitter Boris Feld
Date April 19, 2018, 9:17 a.m.
Message ID <2fc5863507acf55e0fee.1524129429@FB>
Download mbox | patch
Permalink /patch/31197/
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 1524056826 -7200
#      Wed Apr 18 15:07:06 2018 +0200
# Branch stable
# Node ID 2fc5863507acf55e0fee06a8706ab482f2da5273
# Parent  39ad6c3d676f66421c56adcedffabd50fc5a0137
# EXP-Topic issue5821
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 2fc5863507ac
notify: only notify for non-filtered revision

This should fix issue5821 for hook targeting individual revision.

Patch

diff --git a/hgext/notify.py b/hgext/notify.py
--- a/hgext/notify.py
+++ b/hgext/notify.py
@@ -481,7 +481,7 @@  def hook(ui, repo, hooktype, node=None, 
                 ui.pushbuffer()
         if count:
             n.diff(ctx, repo['tip'])
-    else:
+    elif ctx.rev() in repo:
         if not n.node(ctx):
             ui.popbuffer()
             ui.note(_('notify: suppressing notification for merge %d:%s\n') %