/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

  • Committer: Jelmer Vernooij
  • Date: 2020-05-06 19:34:51 UTC
  • mto: This revision was merged to the branch mainline in revision 7502.
  • Revision ID: jelmer@jelmer.uk-20200506193451-v9kgoymkkhe8xbxj
Drop support for python 3.4.

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,
150
155
 
151
156
    def finish_inventory(self):
152
157
        # eliminate blobs that were removed
153
 
        self._blobs = {k: v for (k, v) in self._blobs.items() if v is not None}
 
158
        self._blobs = {k: v for (k, v) in viewitems(
 
159
            self._blobs) if v is not None}
154
160
 
155
161
    def _iterblobs(self):
156
162
        return ((path, sha, mode) for (path, (mode, sha))
157
 
                in self._blobs.items())
 
163
                in viewitems(self._blobs))
158
164
 
159
165
    def commit(self, message):
160
166
        self._validate_unicode_text(message, 'commit message')