~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_push.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
182
182
    def test_post_push_empty_history(self):
183
183
        target = self.make_branch('target')
184
184
        source = self.make_branch('source')
185
 
        Branch.hooks.install_hook('post_push', self.capture_post_push_hook)
 
185
        Branch.hooks.install_named_hook('post_push',
 
186
                                        self.capture_post_push_hook, None)
186
187
        source.push(target)
187
188
        # with nothing there we should still get a notification, and
188
189
        # have both branches locked at the notification time.
210
211
            local = BzrDir.create_branch_convenience('local2')
211
212
            local.bind(target)
212
213
        source = self.make_branch('source')
213
 
        Branch.hooks.install_hook('post_push', self.capture_post_push_hook)
 
214
        Branch.hooks.install_named_hook('post_push',
 
215
                                        self.capture_post_push_hook, None)
214
216
        source.push(local)
215
217
        # with nothing there we should still get a notification, and
216
218
        # have both branches locked at the notification time.
229
231
        sourcedir = target.bzrdir.clone(self.get_url('source'))
230
232
        source = MemoryTree.create_on_branch(sourcedir.open_branch())
231
233
        rev2 = source.commit('rev 2')
232
 
        Branch.hooks.install_hook('post_push', self.capture_post_push_hook)
 
234
        Branch.hooks.install_named_hook('post_push',
 
235
                                        self.capture_post_push_hook, None)
233
236
        source.branch.push(target.branch)
234
237
        # with nothing there we should still get a notification, and
235
238
        # have both branches locked at the notification time.