~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

Merge updated set_parents api.

Show diffs side-by-side

added added

removed removed

Lines of Context:
66
66
import re
67
67
import sys
68
68
import time
69
 
import warnings
70
69
 
71
70
from cStringIO import StringIO
72
71
 
83
82
from bzrlib.trace import mutter, note, warning
84
83
from bzrlib.xml5 import serializer_v5
85
84
from bzrlib.inventory import Inventory, ROOT_ID, InventoryEntry
 
85
from bzrlib import symbol_versioning
86
86
from bzrlib.symbol_versioning import (deprecated_passed,
87
87
        deprecated_function,
88
 
        zero_seven,
89
88
        DEPRECATED_PARAMETER)
90
89
from bzrlib.workingtree import WorkingTree
91
90
 
92
91
 
93
 
@deprecated_function(zero_seven)
94
 
def commit(*args, **kwargs):
95
 
    """Commit a new revision to a branch.
96
 
 
97
 
    Function-style interface for convenience of old callers.
98
 
 
99
 
    New code should use the Commit class instead.
100
 
    """
101
 
    ## XXX: Remove this in favor of WorkingTree.commit?
102
 
    Commit().commit(*args, **kwargs)
103
 
 
104
 
 
105
92
class NullCommitReporter(object):
106
93
    """I report on progress of a commit."""
107
94
 
221
208
        mutter('preparing to commit')
222
209
 
223
210
        if deprecated_passed(branch):
224
 
            warnings.warn("Commit.commit (branch, ...): The branch parameter is "
 
211
            symbol_versioning.warn("Commit.commit (branch, ...): The branch parameter is "
225
212
                 "deprecated as of bzr 0.8. Please use working_tree= instead.",
226
213
                 DeprecationWarning, stacklevel=2)
227
214
            self.branch = branch
504
491
        mutter("Selecting files for commit with filter %s", self.specific_files)
505
492
        entries = self.work_inv.iter_entries()
506
493
        if not self.builder.record_root_entry:
507
 
            warnings.warn('CommitBuilders should support recording the root'
508
 
                ' entry as of bzr 0.10.', DeprecationWarning, stacklevel=1)
 
494
            symbol_versioning.warn('CommitBuilders should support recording'
 
495
                ' the root entry as of bzr 0.10.', DeprecationWarning, 
 
496
                stacklevel=1)
509
497
            self.builder.new_inventory.add(self.basis_inv.root.copy())
510
498
            entries.next()
511
499
            self._emit_progress_update()