/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/errors.py

  • Committer: Andrew Bennetts
  • Date: 2008-04-07 10:34:57 UTC
  • mfrom: (3344 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3349.
  • Revision ID: andrew.bennetts@canonical.com-20080407103457-ro4t95pd3imwt0zw
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
185
185
    _fmt = "The tree builder is already building a tree."
186
186
 
187
187
 
 
188
class BranchError(BzrError):
 
189
    """Base class for concrete 'errors about a branch'."""
 
190
 
 
191
    def __init__(self, branch):
 
192
        BzrError.__init__(self, branch=branch)
 
193
 
 
194
 
188
195
class BzrCheckError(InternalBzrError):
189
196
    
190
197
    _fmt = "Internal check failed: %(message)s"
305
312
        BzrError.__init__(self, repository=repository, file_id=file_id)
306
313
 
307
314
 
 
315
class NotStacked(BranchError):
 
316
 
 
317
    _fmt = "The branch '%(branch)s' is not stacked."
 
318
 
 
319
 
308
320
class InventoryModified(InternalBzrError):
309
321
 
310
322
    _fmt = ("The current inventory for the tree %(tree)r has been modified,"
541
553
 
542
554
class InvalidURLJoin(PathError):
543
555
 
544
 
    _fmt = 'Invalid URL join request: "%(args)s"%(extra)s'
 
556
    _fmt = "Invalid URL join request: %(reason)s: %(base)r + %(join_args)r"
545
557
 
546
 
    def __init__(self, msg, base, args):
547
 
        PathError.__init__(self, base, msg)
548
 
        self.args = [base] + list(args)
 
558
    def __init__(self, reason, base, join_args):
 
559
        self.reason = reason
 
560
        self.base = base
 
561
        self.join_args = join_args
 
562
        PathError.__init__(self, base, reason)
549
563
 
550
564
 
551
565
class UnknownHook(BzrError):
566
580
        PathError.__init__(self, url, extra=extra)
567
581
 
568
582
 
 
583
class UnstackableBranchFormat(BzrError):
 
584
 
 
585
    _fmt = ("The branch '%(url)s'(%(format)s) is not a stackable format. "
 
586
        "You will need to upgrade the branch to permit branch stacking.")
 
587
 
 
588
    def __init__(self, format, url):
 
589
        BzrError.__init__(self)
 
590
        self.format = format
 
591
        self.url = url
 
592
 
 
593
 
 
594
class UnstackableRepositoryFormat(BzrError):
 
595
 
 
596
    _fmt = ("The repository '%(url)s'(%(format)s) is not a stackable format. "
 
597
        "You will need to upgrade the repository to permit branch stacking.")
 
598
 
 
599
    def __init__(self, format, url):
 
600
        BzrError.__init__(self)
 
601
        self.format = format
 
602
        self.url = url
 
603
 
 
604
 
569
605
class ReadError(PathError):
570
606
    
571
607
    _fmt = """Error reading from %(path)r."""
1173
1209
        self.bases = bases
1174
1210
 
1175
1211
 
1176
 
class NoCommits(BzrError):
 
1212
class NoCommits(BranchError):
1177
1213
 
1178
1214
    _fmt = "Branch %(branch)s has no commits."
1179
1215
 
1180
 
    def __init__(self, branch):
1181
 
        BzrError.__init__(self, branch=branch)
1182
 
 
1183
1216
 
1184
1217
class UnlistableStore(BzrError):
1185
1218
 
2190
2223
 
2191
2224
    _fmt = "No smart server available at %(url)s"
2192
2225
 
 
2226
    @symbol_versioning.deprecated_method(symbol_versioning.one_four)
2193
2227
    def __init__(self, url):
2194
2228
        self.url = url
2195
2229