~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-21 04:49:05 UTC
  • mfrom: (2367.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20070321044905-ded01a80ab49bdd9
Update NEWS to match bzr 0.15.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2006, 2007 Canonical Ltd
 
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
159
159
            self.config = None
160
160
        
161
161
    def commit(self,
162
 
               message=None,
 
162
               branch=DEPRECATED_PARAMETER, message=None,
163
163
               timestamp=None,
164
164
               timezone=None,
165
165
               committer=None,
177
177
               recursive='down'):
178
178
        """Commit working copy as a new revision.
179
179
 
 
180
        branch -- the deprecated branch to commit to. New callers should pass in 
 
181
                  working_tree instead
 
182
 
180
183
        message -- the commit message (it or message_callback is required)
181
184
 
182
185
        timestamp -- if not None, seconds-since-epoch for a
203
206
        """
204
207
        mutter('preparing to commit')
205
208
 
206
 
        if working_tree is None:
207
 
            raise BzrError("working_tree must be passed into commit().")
 
209
        if deprecated_passed(branch):
 
210
            symbol_versioning.warn("Commit.commit (branch, ...): The branch parameter is "
 
211
                 "deprecated as of bzr 0.8. Please use working_tree= instead.",
 
212
                 DeprecationWarning, stacklevel=2)
 
213
            self.branch = branch
 
214
            self.work_tree = self.branch.bzrdir.open_workingtree()
 
215
        elif working_tree is None:
 
216
            raise BzrError("One of branch and working_tree must be passed into commit().")
208
217
        else:
209
218
            self.work_tree = working_tree
210
219
            self.branch = self.work_tree.branch