Changeset 1f419ecf in mainline
- Timestamp:
- 2011-08-16T16:08:10Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 6d605e6
- Parents:
- 53d6ac3d
- Location:
- contrib/bazaar/bzreml
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/bazaar/bzreml/__init__.py
r53d6ac3d r1f419ecf 134 134 body.write("New Revision: %s%s\n" % (revision_ac_no, merge_marker(revision_ac))) 135 135 body.write("New Id: %s\n" % revision_ac_id) 136 137 body.write("\n")138 139 136 for parent_id in revision_ac.parent_ids: 140 137 body.write("Parent: %s\n" % parent_id) 141 142 tree_old = branch.repository.revision_tree(parent_id) 143 tree_ac = branch.repository.revision_tree(revision_ac_id) 144 145 delta = tree_ac.changes_from(tree_old) 146 147 if (len(delta.added) > 0): 148 body.write("Added:\n") 149 for item in delta.added: 150 body.write(" %s\n" % item[0]) 151 152 if (len(delta.removed) > 0): 153 body.write("Removed:\n") 154 for item in delta.removed: 155 body.write(" %s\n" % item[0]) 156 157 if (len(delta.renamed) > 0): 158 body.write("Renamed:\n") 159 for item in delta.renamed: 160 body.write(" %s -> %s\n" % (item[0], item[1])) 161 162 if (len(delta.kind_changed) > 0): 163 body.write("Changed:\n") 164 for item in delta.kind_changed: 165 body.write(" %s\n" % item[0]) 166 167 if (len(delta.modified) > 0): 168 body.write("Modified:\n") 169 for item in delta.modified: 170 body.write(" %s\n" % item[0]) 171 172 body.write("\n") 173 138 139 body.write("\n") 140 141 commit_message = "" 174 142 body.write("Log:\n") 175 143 if (not revision_ac.message): … … 179 147 for line in log.split("\n"): 180 148 body.write("%s\n" % line) 149 if (commit_message == ""): 150 commit_message = line 151 152 if (commit_message == ""): 153 commit_message = "(empty)" 181 154 182 155 body.write("\n") … … 184 157 tree_old = branch.repository.revision_tree(revision_old_id) 185 158 tree_new = branch.repository.revision_tree(revision_new_id) 159 160 revision_new_no = branch.revision_id_to_revno(revision_new_id) 161 delta = tree_new.changes_from(tree_old) 162 163 if (len(delta.added) > 0): 164 body.write("Added:\n") 165 for item in delta.added: 166 body.write(" %s\n" % item[0]) 167 168 if (len(delta.removed) > 0): 169 body.write("Removed:\n") 170 for item in delta.removed: 171 body.write(" %s\n" % item[0]) 172 173 if (len(delta.renamed) > 0): 174 body.write("Renamed:\n") 175 for item in delta.renamed: 176 body.write(" %s -> %s\n" % (item[0], item[1])) 177 178 if (len(delta.kind_changed) > 0): 179 body.write("Changed:\n") 180 for item in delta.kind_changed: 181 body.write(" %s\n" % item[0]) 182 183 if (len(delta.modified) > 0): 184 body.write("Modified:\n") 185 for item in delta.modified: 186 body.write(" %s\n" % item[0]) 187 188 body.write("\n") 186 189 187 190 tree_old.lock_read() … … 196 199 tree_old.unlock() 197 200 198 revision_new_no = branch.revision_id_to_revno(revision_new_id) 199 200 delta = tree_new.changes_from(tree_old) 201 files = [] 202 203 for item in delta.added: 204 files.append(item[0]) 205 206 for item in delta.removed: 207 files.append(item[0]) 208 209 for item in delta.renamed: 210 files.append(item[0]) 211 212 for item in delta.kind_changed: 213 files.append(item[0]) 214 215 for item in delta.modified: 216 files.append(item[0]) 217 218 subject = "r%d - %s" % (revision_new_no, " ".join(files)) 201 subject = "r%d - %s" % (revision_new_no, commit_message) 219 202 220 203 send_smtp("localhost", config_sender(config), config_to(config), subject, body.getvalue()) -
contrib/bazaar/bzreml/setup.py
r53d6ac3d r1f419ecf 7 7 description = 'Commit email plugin for Bazaar', 8 8 keywords = 'plugin bzr email', 9 version = '1. 0',9 version = '1.2', 10 10 url = 'http://www.decky.cz/', 11 11 license = 'BSD',
Note:
See TracChangeset
for help on using the changeset viewer.