~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: Martin Pool
  • Date: 2006-06-20 03:57:11 UTC
  • mto: This revision was merged to the branch mainline in revision 1798.
  • Revision ID: mbp@sourcefrog.net-20060620035711-400bb6b6bc6ff95b
Add pyflakes makefile target; fix many warnings

Show diffs side-by-side

added added

removed removed

Lines of Context:
67
67
import re
68
68
import sys
69
69
import time
70
 
import pdb
 
70
import warnings
71
71
 
72
72
from cStringIO import StringIO
73
73
 
86
86
from bzrlib.trace import mutter, note, warning
87
87
from bzrlib.xml5 import serializer_v5
88
88
from bzrlib.inventory import Inventory, ROOT_ID, InventoryEntry
89
 
from bzrlib.symbol_versioning import *
 
89
from bzrlib.symbol_versioning import (deprecated_passed,
 
90
        DEPRECATED_PARAMETER)
90
91
from bzrlib.workingtree import WorkingTree
91
92
 
92
93
 
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 Branch.commit?
102
 
    Commit().commit(*args, **kwargs)
103
 
 
104
 
 
105
94
class NullCommitReporter(object):
106
95
    """I report on progress of a commit."""
107
96
 
221
210
        mutter('preparing to commit')
222
211
 
223
212
        if deprecated_passed(branch):
224
 
            warn("Commit.commit (branch, ...): The branch parameter is "
 
213
            warnings.warn("Commit.commit (branch, ...): The branch parameter is "
225
214
                 "deprecated as of bzr 0.8. Please use working_tree= instead.",
226
215
                 DeprecationWarning, stacklevel=2)
227
216
            self.branch = branch