~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/errors.py

  • Committer: Olaf Conradi
  • Date: 2006-03-29 21:07:20 UTC
  • mto: (1661.1.1 bzr.mbp.remember)
  • mto: This revision was merged to the branch mainline in revision 1663.
  • Revision ID: olaf@conradi.org-20060329210720-8e43fffa2a24d1a4
Re-added AmbiguousBase with a deprecated warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
fullstop.
54
54
"""
55
55
 
 
56
from warnings import warn
 
57
 
56
58
# based on Scott James Remnant's hct error classes
57
59
 
58
60
# TODO: is there any value in providing the .args field used by standard
434
436
        self.revisions = revisions
435
437
 
436
438
 
 
439
class AmbiguousBase(BzrError):
 
440
    def __init__(self, bases):
 
441
        warn("BzrError AmbiguousBase has been deprecated as of bzrlib 0.8.",
 
442
                DeprecationWarning)
 
443
        msg = "The correct base is unclear, becase %s are all equally close" %\
 
444
            ", ".join(bases)
 
445
        BzrError.__init__(self, msg)
 
446
        self.bases = bases
 
447
 
 
448
 
437
449
class NoCommits(BzrError):
438
450
    def __init__(self, branch):
439
451
        msg = "Branch %s has no commits." % branch