~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

  • Committer: Robert Collins
  • Date: 2007-02-06 02:33:42 UTC
  • mto: This revision was merged to the branch mainline in revision 2274.
  • Revision ID: robertc@robertcollins.net-20070206023342-hv5o5qh6pdktiwbc
New branch hooks: post_push, post_pull, post_commit, post_uncommit. These
complement the set_rh hook by allowing different actions, and awareness of
the prior state of the branch, for operations where this matters.

Fix the inability to do a bzr pull --overwrite of a heavyweight checkout.

Add branch implementation tests for uncommit and commit.

(Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
        """Check that creating a BranchHooks instance has the right defaults."""
172
172
        hooks = bzrlib.branch.BranchHooks()
173
173
        self.assertTrue("set_rh" in hooks, "set_rh not in %s" % hooks)
 
174
        self.assertTrue("post_push" in hooks, "post_push not in %s" % hooks)
 
175
        self.assertTrue("post_commit" in hooks, "post_commit not in %s" % hooks)
 
176
        self.assertTrue("post_pull" in hooks, "post_pull not in %s" % hooks)
 
177
        self.assertTrue("post_uncommit" in hooks, "post_uncommit not in %s" % hooks)
174
178
 
175
179
    def test_installed_hooks_are_BranchHooks(self):
176
180
        """The installed hooks object should be a BranchHooks."""