/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 breezy/git/commit.py

Some improvements for transform and tests for GitTransform.

Merged from https://code.launchpad.net/~jelmer/brz/transform-1/+merge/389367

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from dulwich.index import (
23
23
    commit_tree,
 
24
    read_submodule_head,
24
25
    )
25
26
import stat
26
27
 
47
48
    Blob,
48
49
    Commit,
49
50
    )
50
 
from dulwich.index import read_submodule_head
51
51
 
52
52
 
53
53
from .mapping import (
120
120
                finally:
121
121
                    f.close()
122
122
                sha = blob.id
123
 
                entry.text_size = st.st_size
 
123
                if st is not None:
 
124
                    entry.text_size = st.st_size
 
125
                else:
 
126
                    entry.text_size = len(blob.data)
124
127
                entry.git_sha1 = sha
125
128
                self.store.add_object(blob)
126
129
            elif change.kind[1] == "symlink":