configitems: register the 'notify.strip' config
authorBoris Feld <boris.feld@octobus.net>
Fri, 30 Jun 2017 03:43:28 +0200
changeset 33747 71665bbe82c1
parent 33746 20189ba5fddf
child 33748 c27fac1ca8ed
configitems: register the 'notify.strip' config
hgext/notify.py
--- 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')