Index: mailer.py =================================================================== --- mailer.py (revision 11918) +++ mailer.py (working copy) @@ -247,61 +247,17 @@ ### hunh. this code isn't actually needed for StandardOutput. refactor? # collect the set of groups and the unique sets of params for the options self.groups = { } + paths = [] for path, change in self.changelist: + paths.append('/' + path) for (group, params) in self.cfg.which_groups(path): # turn the params into a hashable object and stash it away param_list = params.items() param_list.sort() self.groups[group, tuple(param_list)] = params - # figure out the changed directories - dirs = { } - for path, change in self.changelist: - if change.item_kind == svn.core.svn_node_dir: - dirs[path] = None - else: - idx = string.rfind(path, '/') - if idx == -1: - dirs[''] = None - else: - dirs[path[:idx]] = None + self.output.subject = 'r%d - %s' % (repos.rev, string.join(paths, ' ')) - dirlist = dirs.keys() - - # figure out the common portion of all the dirs. note that there is - # no "common" if only a single dir was changed, or the root was changed. - if len(dirs) == 1 or dirs.has_key(''): - commondir = '' - else: - common = string.split(dirlist.pop(), '/') - for d in dirlist: - parts = string.split(d, '/') - for i in range(len(common)): - if i == len(parts) or common[i] != parts[i]: - del common[i:] - break - commondir = string.join(common, '/') - if commondir: - # strip the common portion from each directory - l = len(commondir) + 1 - dirlist = [ ] - for d in dirs.keys(): - if d == commondir: - dirlist.append('.') - else: - dirlist.append(d[l:]) - else: - # nothing in common, so reset the list of directories - dirlist = dirs.keys() - - # compose the basic subject line. later, we can prefix it. - dirlist.sort() - dirlist = string.join(dirlist) - if commondir: - self.output.subject = 'r%d - in %s: %s' % (repos.rev, commondir, dirlist) - else: - self.output.subject = 'r%d - %s' % (repos.rev, dirlist) - def generate(self): "Generate email for the various groups and option-params."