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

login
register
mail settings
Submitter Boris Feld
Date Aug. 11, 2017, 1:23 p.m.
Message ID <f60ab18ff3fd401c4607.1502457798@FB>
Download mbox | patch
Permalink /patch/22873/
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 1498786998 -7200
#      Fri Jun 30 03:43:18 2017 +0200
# Node ID f60ab18ff3fd401c460755b77001a9fa1bbf6977
# Parent  02a745c20121f9add702f0200dc5522e912c2d20
# EXP-Topic config.register.notify
configitems: register the 'notify.config' config

Patch

diff -r 02a745c20121 -r f60ab18ff3fd hgext/notify.py
--- a/hgext/notify.py	Thu Aug 10 18:55:33 2017 -0400
+++ b/hgext/notify.py	Fri Jun 30 03:43:18 2017 +0200
@@ -145,6 +145,7 @@ 
     error,
     mail,
     patch,
+    registrar,
     util,
 )
 
@@ -154,6 +155,13 @@ 
 # leave the attribute unspecified.
 testedwith = 'ships-with-hg-core'
 
+configtable = {}
+configitem = registrar.configitem(configtable)
+
+configitem('notify', 'config',
+    default=None,
+)
+
 # template for single changeset can include email headers.
 single_template = '''
 Subject: changeset in {webroot}: {desc|firstline|strip}