Rev 16: Fix the tree ordering in the diff logic, so the diff is the right way around. in file:///home/robertc/source/baz/plugins/email/trunk/
Robert Collins
robertc at robertcollins.net
Fri Dec 1 05:02:11 GMT 2006
------------------------------------------------------------
revno: 16
revision-id: robertc at robertcollins.net-20061201050211-e377c35391fb42d1
parent: robertc at robertcollins.net-20061201045937-16d9addeac6c446c
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Fri 2006-12-01 16:02:11 +1100
message:
Fix the tree ordering in the diff logic, so the diff is the right way around.
modified:
__init__.py __init__.py-20051018071212-f1765ec4521cab0b
=== modified file '__init__.py'
--- a/__init__.py 2006-12-01 04:59:37 +0000
+++ b/__init__.py 2006-12-01 05:02:11 +0000
@@ -66,14 +66,14 @@
"""
from bzrlib.diff import show_diff_trees
# optionally show the diff if its smaller than the post_commit_difflimit option
- revid1 = self.revision.revision_id
+ revid_new = self.revision.revision_id
if self.revision.parent_ids:
- revid2 = self.revision.parent_ids[0]
+ revid_old = self.revision.parent_ids[0]
else:
- revid2 = None
- tree1, tree2 = self.branch.repository.revision_trees((revid1, revid2))
+ revid_old = None
+ tree_new, tree_old = self.branch.repository.revision_trees((revid_new, revid_old))
diff_content = StringIO()
- show_diff_trees(tree1, tree2, diff_content)
+ show_diff_trees(tree_old, tree_new, diff_content)
lines = diff_content.getvalue().split("\n")
numlines = len(lines)
difflimit = self.difflimit()
More information about the bazaar-commits
mailing list