/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: Gary van der Merwe
  • Date: 2010-03-01 19:53:13 UTC
  • mto: This revision was merged to the branch mainline in revision 5073.
  • Revision ID: garyvdm@gmail.com-20100301195313-hc3nek3cu8g5kkqh
Make it possible to detect a BoundBranchOutOfDate from commit.

* ``bzrlib.builtins.Commit.run`` raises ``bzrlib.errors.BoundBranchOutOfDate``
  rather than ``bzrlib.errors.BzrCommandError`` when the bound branch is out
  of date. (Gary van der Merwe)
* ``bzrlib.errors.BoundBranchOutOfDate`` has a new field ``extra_help``
  which can be set to add extra help to the error. (Gary van der Merwe)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1297
1297
class BoundBranchOutOfDate(BzrError):
1298
1298
 
1299
1299
    _fmt = ("Bound branch %(branch)s is out of date with master branch"
1300
 
            " %(master)s.")
 
1300
            " %(master)s.%(extra_help)s")
1301
1301
 
1302
1302
    def __init__(self, branch, master):
1303
1303
        BzrError.__init__(self)
1304
1304
        self.branch = branch
1305
1305
        self.master = master
 
1306
        self.extra_help = ''
1306
1307
 
1307
1308
 
1308
1309
class CommitToDoubleBoundBranch(BzrError):