~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

  • Committer: John Arbash Meinel
  • Date: 2006-06-18 02:21:57 UTC
  • mfrom: (1787 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1794.
  • Revision ID: john@arbash-meinel.com-20060618022157-6e33aa9b67c25e4f
[merge] bzr.dev 1787

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 warnings
 
70
import pdb
71
71
 
72
72
from cStringIO import StringIO
73
73
 
75
75
import bzrlib.config
76
76
import bzrlib.errors as errors
77
77
from bzrlib.errors import (BzrError, PointlessCommit,
 
78
                           HistoryMissing,
78
79
                           ConflictsInTree,
79
80
                           StrictCommitFailed
80
81
                           )
85
86
from bzrlib.trace import mutter, note, warning
86
87
from bzrlib.xml5 import serializer_v5
87
88
from bzrlib.inventory import Inventory, ROOT_ID, InventoryEntry
88
 
from bzrlib.symbol_versioning import (deprecated_passed,
89
 
        deprecated_function,
90
 
        zero_seven,
91
 
        DEPRECATED_PARAMETER)
 
89
from bzrlib.symbol_versioning import *
92
90
from bzrlib.workingtree import WorkingTree
93
91
 
94
92
 
223
221
        mutter('preparing to commit')
224
222
 
225
223
        if deprecated_passed(branch):
226
 
            warnings.warn("Commit.commit (branch, ...): The branch parameter is "
 
224
            warn("Commit.commit (branch, ...): The branch parameter is "
227
225
                 "deprecated as of bzr 0.8. Please use working_tree= instead.",
228
226
                 DeprecationWarning, stacklevel=2)
229
227
            self.branch = branch
459
457
            if not self.branch.repository.has_revision(parent_id):
460
458
                if parent_id == self.branch.last_revision():
461
459
                    warning("parent is missing %r", parent_id)
462
 
                    raise BzrCheckError("branch %s is missing revision {%s}"
463
 
                            % (self.branch, parent_id))
 
460
                    raise HistoryMissing(self.branch, 'revision', parent_id)
 
461
                else:
 
462
                    mutter("commit will ghost revision %r", parent_id)
464
463
            
465
464
    def _remove_deleted(self):
466
465
        """Remove deleted files from the working inventories.