/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

Merge from bzr.dev and newer set-last-revision changes.

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
501
488
        mutter("Selecting files for commit with filter %s", self.specific_files)
502
489
        entries = self.work_inv.iter_entries()
503
490
        if not self.builder.record_root_entry:
504
 
            warnings.warn('CommitBuilders should support recording the root'
505
 
                ' entry as of bzr 0.10.', DeprecationWarning, stacklevel=1)
 
491
            symbol_versioning.warn('CommitBuilders should support recording'
 
492
                ' the root entry as of bzr 0.10.', DeprecationWarning, 
 
493
                stacklevel=1)
506
494
            self.builder.new_inventory.add(self.basis_inv.root.copy())
507
495
            entries.next()
508
496
            self._emit_progress_update()