~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_uncommit.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:
53
53
        tree.add('')
54
54
        revid = tree.commit('a revision')
55
55
        tree.unlock()
56
 
        Branch.hooks.install_hook('post_uncommit',
57
 
            self.capture_post_uncommit_hook)
 
56
        Branch.hooks.install_named_hook('post_uncommit',
 
57
            self.capture_post_uncommit_hook, None)
58
58
        uncommit(tree.branch)
59
59
        # with nothing left we should still get a notification, and
60
60
        # have the branch locked at notification time.
76
76
        tree.add('')
77
77
        revid = tree.commit('a revision')
78
78
        tree.unlock()
79
 
        Branch.hooks.install_hook('post_uncommit',
80
 
            self.capture_post_uncommit_hook)
 
79
        Branch.hooks.install_named_hook('post_uncommit',
 
80
            self.capture_post_uncommit_hook, None)
81
81
        uncommit(tree.branch)
82
82
        # with nothing left we should still get a notification, and
83
83
        # have the branch locked at notification time.
95
95
        revid2 = tree.commit('second revision')
96
96
        revid3 = tree.commit('third revision')
97
97
        tree.unlock()
98
 
        Branch.hooks.install_hook('post_uncommit',
99
 
            self.capture_post_uncommit_hook)
 
98
        Branch.hooks.install_named_hook('post_uncommit',
 
99
            self.capture_post_uncommit_hook, None)
100
100
        uncommit(tree.branch, revno=2)
101
101
        # having uncommitted from up the branch, we should get the
102
102
        # before and after revnos and revids correctly.