hgext/notify.py
changeset 33747 71665bbe82c1
parent 33746 20189ba5fddf
child 33748 c27fac1ca8ed
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)