/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

Support committing to a git branch from a bzr working tree. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
from dulwich.index import (
22
22
    commit_tree,
23
23
    )
 
24
import os
24
25
import stat
25
26
 
26
27
from bzrlib.repository import (
93
94
                mode |= 0111
94
95
            self._any_changes = True
95
96
            self._blobs[path[1].encode("utf-8")] = (mode, sha)
96
 
            yield file_id, path, (None, None)
 
97
            file_sha1 = workingtree.get_file_sha1(file_id, path[1])
 
98
            yield file_id, path[1], (file_sha1, os.lstat(workingtree.abspath(path[1])))
97
99
        # Fill in entries that were not changed
98
100
        basis_tree = workingtree.basis_tree()
99
101
        assert basis_tree.get_revision_id() == basis_revid