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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-30 19:16:23 UTC
  • mto: This revision was merged to the branch mainline in revision 6639.
  • Revision ID: jelmer@jelmer.uk-20170530191623-t9ls96vjy9wslpoo
Remove deprecated functionality.

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
                      )
72
72
from .trace import mutter, note, is_quiet
73
73
from .inventory import Inventory, InventoryEntry, make_entry
74
 
from . import symbol_versioning
75
74
from .urlutils import unescape_for_display
76
75
from .i18n import gettext
77
76
 
79
78
class NullCommitReporter(object):
80
79
    """I report on progress of a commit."""
81
80
 
82
 
    def started(self, revno, revid, location=None):
83
 
        if location is None:
84
 
            symbol_versioning.warn("As of bzr 1.0 you must pass a location "
85
 
                                   "to started.", DeprecationWarning,
86
 
                                   stacklevel=2)
 
81
    def started(self, revno, revid, location):
87
82
        pass
88
83
 
89
84
    def snapshot_change(self, change, path):
120
115
        self._note("%s %s", change, path)
121
116
 
122
117
    def started(self, revno, rev_id, location=None):
123
 
        if location is not None:
124
 
            location = ' to: ' + unescape_for_display(location, 'utf-8')
125
 
        else:
126
 
            # When started was added, location was only made optional by
127
 
            # accident.  Matt Nordhoff 20071129
128
 
            symbol_versioning.warn("As of bzr 1.0 you must pass a location "
129
 
                                   "to started.", DeprecationWarning,
130
 
                                   stacklevel=2)
131
 
            location = ''
132
 
        self._note(gettext('Committing%s'), location)
 
118
        self._note(
 
119
            gettext('Committing to: %s'),
 
120
            unescape_for_display(location, 'utf-8'))
133
121
 
134
122
    def completed(self, revno, rev_id):
135
123
        self._note(gettext('Committed revision %d.'), revno)
176
164
        self.config_stack = config_stack
177
165
 
178
166
    @staticmethod
179
 
    def update_revprops(revprops, branch, authors=None, author=None,
 
167
    def update_revprops(revprops, branch, authors=None,
180
168
                        local=False, possible_master_transports=None):
181
169
        if revprops is None:
182
170
            revprops = {}
187
175
                local,
188
176
                possible_master_transports)
189
177
        if authors is not None:
190
 
            if author is not None:
191
 
                raise AssertionError('Specifying both author and authors '
192
 
                        'is not allowed. Specify just authors instead')
193
178
            if 'author' in revprops or 'authors' in revprops:
194
179
                # XXX: maybe we should just accept one of them?
195
180
                raise AssertionError('author property given twice')
199
184
                        raise AssertionError('\\n is not a valid character '
200
185
                                'in an author identity')
201
186
                revprops['authors'] = '\n'.join(authors)
202
 
        if author is not None:
203
 
            symbol_versioning.warn('The parameter author was deprecated'
204
 
                   ' in version 1.13. Use authors instead',
205
 
                   DeprecationWarning)
206
 
            if 'author' in revprops or 'authors' in revprops:
207
 
                # XXX: maybe we should just accept one of them?
208
 
                raise AssertionError('author property given twice')
209
 
            if '\n' in author:
210
 
                raise AssertionError('\\n is not a valid character '
211
 
                        'in an author identity')
212
 
            revprops['authors'] = author
213
187
        return revprops
214
188
 
215
189
    def commit(self,