[PATCH 10 of 13 config] configitems: register the 'notify.strip' config

Boris Feld boris.feld at octobus.net
Fri Aug 11 09:23:27 EDT 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1498787008 -7200
#      Fri Jun 30 03:43:28 2017 +0200
# Node ID 7d5c8af4fd4a2ffdf41588a61509f73cfc8f3ea5
# Parent  99b3015b7ca492d785a3ac4351fc6812e80a3bc4
# EXP-Topic config.register.notify
configitems: register the 'notify.strip' config

diff -r 99b3015b7ca4 -r 7d5c8af4fd4a 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')


More information about the Mercurial-devel mailing list