/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

Support Git rename tracking.

Merged from https://code.launchpad.net/~jelmer/brz/renames/+merge/381006

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
"""Support for committing in native Git working trees."""
19
19
 
 
20
from __future__ import absolute_import
 
21
 
20
22
from dulwich.index import (
21
23
    commit_tree,
22
24
    )
37
39
from ..repository import (
38
40
    CommitBuilder,
39
41
    )
 
42
from ..sixish import (
 
43
    viewitems,
 
44
    )
40
45
 
41
46
from dulwich.objects import (
42
47
    Blob,
154
159
 
155
160
    def finish_inventory(self):
156
161
        # eliminate blobs that were removed
157
 
        self._blobs = {k: v for (k, v) in self._blobs.items()}
 
162
        self._blobs = {k: v for (k, v) in viewitems(self._blobs)}
158
163
 
159
164
    def _iterblobs(self):
160
165
        return ((path, sha, mode) for (path, (mode, sha))
161
 
                in self._blobs.items())
 
166
                in viewitems(self._blobs))
162
167
 
163
168
    def commit(self, message):
164
169
        self._validate_unicode_text(message, 'commit message')