/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to commit.py

Fix support for older versions of Dulwich.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
    S_IFGITLINK,
32
32
    Blob,
33
33
    Commit,
34
 
    Tree,
35
34
    )
36
35
 
37
36
 
49
48
 
50
49
    def record_entry_contents(self, ie, parent_invs, path, tree,
51
50
        content_summary):
52
 
        raise NotImplementedError(self.record_entry_contents)        
 
51
        raise NotImplementedError(self.record_entry_contents)
53
52
 
54
53
    def record_delete(self, path, file_id):
55
54
        self._blobs[path] = None
70
69
                blob = Blob()
71
70
                blob.data = workingtree.get_file_text(file_id, path)
72
71
                return blob.id
73
 
        for (file_id, path, changed_content, versioned, parent, name, kind, 
 
72
        for (file_id, path, changed_content, versioned, parent, name, kind,
74
73
             executable) in iter_changes:
75
74
            if kind[1] in ("directory",):
76
75
                if kind[0] in ("file", "symlink"):
117
116
 
118
117
    def commit(self, message):
119
118
        c = Commit()
120
 
        c.parents = [self.repository.lookup_git_revid(revid)[0] for revid in self.parents]
121
 
        c.tree = commit_tree(self.store, 
 
119
        c.parents = [self.repository.lookup_bzr_revision_id(revid)[0] for revid in self.parents]
 
120
        c.tree = commit_tree(self.store,
122
121
                [(path, sha, mode) for (path, (mode, sha)) in self._blobs.iteritems()])
123
122
        c.committer = self._committer
124
123
        c.author = self._revprops.get('author', self._committer)