Changeset 26e7d6d in mainline for contrib/bazaar/bzreml/__init__.py
- Timestamp:
- 2011-09-19T16:31:00Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a347a11
- Parents:
- 3842a955 (diff), 086290d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
contrib/bazaar/bzreml/__init__.py
r3842a955 r26e7d6d 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())
Note:
See TracChangeset
for help on using the changeset viewer.