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

  • Committer: Aaron Bentley
  • Date: 2010-04-23 19:46:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100423194624-9y4oia3pzb19505o
TreeTransform supports normal commit parameters and includes branch nick.

Show diffs side-by-side

added added

removed removed

Lines of Context:
189
189
        self.reporter = reporter
190
190
        self.config = config
191
191
 
 
192
    @staticmethod
 
193
    def update_revprops(revprops, branch, authors=None, author=None,
 
194
                        local=False, possible_master_transports=None):
 
195
        if revprops is None:
 
196
            revprops = {}
 
197
        if possible_master_transports is None:
 
198
            possible_master_transports = []
 
199
        if not 'branch-nick' in revprops:
 
200
            revprops['branch-nick'] = branch._get_nick(
 
201
                local,
 
202
                possible_master_transports)
 
203
        if authors is not None:
 
204
            if author is not None:
 
205
                raise AssertionError('Specifying both author and authors '
 
206
                        'is not allowed. Specify just authors instead')
 
207
            if 'author' in revprops or 'authors' in revprops:
 
208
                # XXX: maybe we should just accept one of them?
 
209
                raise AssertionError('author property given twice')
 
210
            if authors:
 
211
                for individual in authors:
 
212
                    if '\n' in individual:
 
213
                        raise AssertionError('\\n is not a valid character '
 
214
                                'in an author identity')
 
215
                revprops['authors'] = '\n'.join(authors)
 
216
        if author is not None:
 
217
            symbol_versioning.warn('The parameter author was deprecated'
 
218
                   ' in version 1.13. Use authors instead',
 
219
                   DeprecationWarning)
 
220
            if 'author' in revprops or 'authors' in revprops:
 
221
                # XXX: maybe we should just accept one of them?
 
222
                raise AssertionError('author property given twice')
 
223
            if '\n' in author:
 
224
                raise AssertionError('\\n is not a valid character '
 
225
                        'in an author identity')
 
226
            revprops['authors'] = author
 
227
        return revprops
 
228
 
192
229
    def commit(self,
193
230
               message=None,
194
231
               timestamp=None,