The branch, master has been updated via fa01026 Use dulwich function for writing tree diffs. from e05015e More work on builds.
http://gitweb.samba.org/?p=build-farm.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit fa0102693be7727409ffaa0b8287156aac384e97 Author: Jelmer Vernooij <jel...@samba.org> Date: Sun Nov 21 15:02:42 2010 +0100 Use dulwich function for writing tree diffs. ----------------------------------------------------------------------- Summary of changes: buildfarm/history.py | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) Changeset truncated at 500 lines: diff --git a/buildfarm/history.py b/buildfarm/history.py index 4a402ae..44bd4dc 100644 --- a/buildfarm/history.py +++ b/buildfarm/history.py @@ -22,7 +22,7 @@ from cStringIO import StringIO from dulwich.objects import Tree -from dulwich.patch import write_blob_diff +from dulwich.patch import write_tree_diff from dulwich.repo import Repo @@ -107,8 +107,9 @@ class GitBranch(Branch): def diff(self, revision): commit = self.repo[revision] f = StringIO() - changes = self._changes_for(commit) - for (oldpath, newpath), (oldmode, newmode), (oldsha, newsha) in changes: - write_blob_diff(f, (oldpath, oldmode, self.store[oldsha]), - (newpath, newmode, self.store[newsha])) + if len(commit.parents) == 0: + parent_tree = Tree().id + else: + parent_tree = self.store[commit.parents[0]].tree + write_tree_diff(f, self.store, parent_tree, commit.tree) return (self._revision_from_commit(commit), f.getvalue()) -- build.samba.org