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

login
register
mail settings
Submitter Boris Feld
Date Aug. 11, 2017, 1:23 p.m.
Message ID <7d5c8af4fd4a2ffdf415.1502457807@FB>
Download mbox | patch
Permalink /patch/22878/
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 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

Patch

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')