Mercurial > hg
comparison hgext/notify.py @ 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 |
comparison
equal
deleted
inserted
replaced
33746:20189ba5fddf | 33747:71665bbe82c1 |
---|---|
183 default=True, | 183 default=True, |
184 ) | 184 ) |
185 configitem('notify', 'sources', | 185 configitem('notify', 'sources', |
186 default='serve', | 186 default='serve', |
187 ) | 187 ) |
188 configitem('notify', 'strip', | |
189 default=0, | |
190 ) | |
188 | 191 |
189 # template for single changeset can include email headers. | 192 # template for single changeset can include email headers. |
190 single_template = ''' | 193 single_template = ''' |
191 Subject: changeset in {webroot}: {desc|firstline|strip} | 194 Subject: changeset in {webroot}: {desc|firstline|strip} |
192 From: {author} | 195 From: {author} |
217 self.ui = ui | 220 self.ui = ui |
218 cfg = self.ui.config('notify', 'config') | 221 cfg = self.ui.config('notify', 'config') |
219 if cfg: | 222 if cfg: |
220 self.ui.readconfig(cfg, sections=['usersubs', 'reposubs']) | 223 self.ui.readconfig(cfg, sections=['usersubs', 'reposubs']) |
221 self.repo = repo | 224 self.repo = repo |
222 self.stripcount = int(self.ui.config('notify', 'strip', 0)) | 225 self.stripcount = int(self.ui.config('notify', 'strip')) |
223 self.root = self.strip(self.repo.root) | 226 self.root = self.strip(self.repo.root) |
224 self.domain = self.ui.config('notify', 'domain') | 227 self.domain = self.ui.config('notify', 'domain') |
225 self.mbox = self.ui.config('notify', 'mbox') | 228 self.mbox = self.ui.config('notify', 'mbox') |
226 self.test = self.ui.configbool('notify', 'test', True) | 229 self.test = self.ui.configbool('notify', 'test', True) |
227 self.charsets = mail._charsets(self.ui) | 230 self.charsets = mail._charsets(self.ui) |