changeset 33747:71665bbe82c1

configitems: register the 'notify.strip' config
author Boris Feld <boris.feld@octobus.net>
date Fri, 30 Jun 2017 03:43:28 +0200
parents 20189ba5fddf
children c27fac1ca8ed
files hgext/notify.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/notify.py	Fri Jun 30 03:43:27 2017 +0200
+++ b/hgext/notify.py	Fri Jun 30 03:43:28 2017 +0200
@@ -185,6 +185,9 @@
 configitem('notify', 'sources',
     default='serve',
 )
+configitem('notify', 'strip',
+    default=0,
+)
 
 # template for single changeset can include email headers.
 single_template = '''
@@ -219,7 +222,7 @@
         if cfg:
             self.ui.readconfig(cfg, sections=['usersubs', 'reposubs'])
         self.repo = repo
-        self.stripcount = int(self.ui.config('notify', 'strip', 0))
+        self.stripcount = int(self.ui.config('notify', 'strip'))
         self.root = self.strip(self.repo.root)
         self.domain = self.ui.config('notify', 'domain')
         self.mbox = self.ui.config('notify', 'mbox')