~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

Merge the 2.0 branch, resolve one conflict.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1103
1103
        params = ChangeBranchTipParams(
1104
1104
            self, old_revno, new_revno, old_revid, new_revid)
1105
1105
        for hook in hooks:
1106
 
            hook(params)
 
1106
            try:
 
1107
                hook(params)
 
1108
            except errors.TipChangeRejected:
 
1109
                raise
 
1110
            except Exception:
 
1111
                exc_info = sys.exc_info()
 
1112
                hook_name = Branch.hooks.get_hook_name(hook)
 
1113
                raise errors.HookFailed(
 
1114
                    'pre_change_branch_tip', hook_name, exc_info)
1107
1115
 
1108
1116
    @needs_write_lock
1109
1117
    def update(self):
1441
1449
            format_string = transport.get_bytes("format")
1442
1450
            return klass._formats[format_string]
1443
1451
        except errors.NoSuchFile:
1444
 
            raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
 
1452
            raise errors.NotBranchError(path=transport.base)
1445
1453
        except KeyError:
1446
1454
            raise errors.UnknownFormatError(format=format_string, kind='branch')
1447
1455
 
1796
1804
                              _repository=a_bzrdir.find_repository(),
1797
1805
                              ignore_fallbacks=ignore_fallbacks)
1798
1806
        except errors.NoSuchFile:
1799
 
            raise errors.NotBranchError(path=transport.base, bzrdir=a_bzrdir)
 
1807
            raise errors.NotBranchError(path=transport.base)
1800
1808
 
1801
1809
    def __init__(self):
1802
1810
        super(BranchFormatMetadir, self).__init__()