Patchwork [09,of,13,config] configitems: register the 'notify.sources' config

login
register
mail settings
Submitter Boris Feld
Date Aug. 11, 2017, 1:23 p.m.
Message ID <99b3015b7ca492d785a3.1502457806@FB>
Download mbox | patch
Permalink /patch/22881/
State Accepted
Headers show

Comments

Boris Feld - Aug. 11, 2017, 1:23 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1498787007 -7200
#      Fri Jun 30 03:43:27 2017 +0200
# Node ID 99b3015b7ca492d785a3ac4351fc6812e80a3bc4
# Parent  aafac577cb93e119e24855779e31f82d7879bc6f
# EXP-Topic config.register.notify
configitems: register the 'notify.sources' config

Patch

diff -r aafac577cb93 -r 99b3015b7ca4 hgext/notify.py
--- a/hgext/notify.py	Fri Jun 30 03:43:26 2017 +0200
+++ b/hgext/notify.py	Fri Jun 30 03:43:27 2017 +0200
@@ -182,6 +182,9 @@ 
 configitem('notify', 'merge',
     default=True,
 )
+configitem('notify', 'sources',
+    default='serve',
+)
 
 # template for single changeset can include email headers.
 single_template = '''
@@ -294,7 +297,7 @@ 
 
     def skipsource(self, source):
         '''true if incoming changes from this source should be skipped.'''
-        ok_sources = self.ui.config('notify', 'sources', 'serve').split()
+        ok_sources = self.ui.config('notify', 'sources').split()
         return source not in ok_sources
 
     def send(self, ctx, count, data):