~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Andrew Bennetts
  • Date: 2010-01-15 03:58:20 UTC
  • mfrom: (4963 +trunk)
  • mto: (4973.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 4975.
  • Revision ID: andrew.bennetts@canonical.com-20100115035820-ilb3t36swgzq6v1l
MergeĀ lp:bzr.

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
 
            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)
 
1106
            hook(params)
1115
1107
 
1116
1108
    @needs_write_lock
1117
1109
    def update(self):
2143
2135
        # All-in-one needs to always unlock/lock.
2144
2136
        repo_control = getattr(self.repository, 'control_files', None)
2145
2137
        if self.control_files == repo_control or not self.is_locked():
 
2138
            self.repository._warn_if_deprecated(self)
2146
2139
            self.repository.lock_write()
2147
2140
            took_lock = True
2148
2141
        else:
2160
2153
        # All-in-one needs to always unlock/lock.
2161
2154
        repo_control = getattr(self.repository, 'control_files', None)
2162
2155
        if self.control_files == repo_control or not self.is_locked():
 
2156
            self.repository._warn_if_deprecated(self)
2163
2157
            self.repository.lock_read()
2164
2158
            took_lock = True
2165
2159
        else: