~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-05-01 04:55:31 UTC
  • mfrom: (3394.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20080501045531-3hkmq9qzoeequw1s
Add Hooks.install_named_hook (Daniel Watkins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
130
130
    def test_post_pull_empty_history(self):
131
131
        target = self.make_branch('target')
132
132
        source = self.make_branch('source')
133
 
        Branch.hooks.install_hook('post_pull', self.capture_post_pull_hook)
 
133
        Branch.hooks.install_named_hook('post_pull',
 
134
            self.capture_post_pull_hook, None)
134
135
        target.pull(source)
135
136
        # with nothing there we should still get a notification, and
136
137
        # have both branches locked at the notification time.
158
159
            local = BzrDir.create_branch_convenience('local2')
159
160
            local.bind(target)
160
161
        source = self.make_branch('source')
161
 
        Branch.hooks.install_hook('post_pull', self.capture_post_pull_hook)
 
162
        Branch.hooks.install_named_hook('post_pull',
 
163
            self.capture_post_pull_hook, None)
162
164
        local.pull(source)
163
165
        # with nothing there we should still get a notification, and
164
166
        # have both branches locked at the notification time.
177
179
        sourcedir = target.bzrdir.clone(self.get_url('source'))
178
180
        source = MemoryTree.create_on_branch(sourcedir.open_branch())
179
181
        rev2 = source.commit('rev 2')
180
 
        Branch.hooks.install_hook('post_pull', self.capture_post_pull_hook)
 
182
        Branch.hooks.install_named_hook('post_pull',
 
183
            self.capture_post_pull_hook, None)
181
184
        target.branch.pull(source.branch)
182
185
        # with nothing there we should still get a notification, and
183
186
        # have both branches locked at the notification time.