~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-09-22 06:45:55 UTC
  • mfrom: (3703.3.9 faster-empty-push)
  • Revision ID: pqm@pqm.ubuntu.com-20080922064555-jayr5evddyn8w7g6
Faster push when there are no new revisions,
        and when there are no local tags. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
801
801
    def _clear_hooks(self):
802
802
        # prevent hooks affecting tests
803
803
        import bzrlib.branch
 
804
        import bzrlib.smart.client
804
805
        import bzrlib.smart.server
805
806
        self._preserved_hooks = {
806
807
            bzrlib.branch.Branch: bzrlib.branch.Branch.hooks,
807
808
            bzrlib.mutabletree.MutableTree: bzrlib.mutabletree.MutableTree.hooks,
 
809
            bzrlib.smart.client._SmartClient: bzrlib.smart.client._SmartClient.hooks,
808
810
            bzrlib.smart.server.SmartTCPServer: bzrlib.smart.server.SmartTCPServer.hooks,
809
811
            }
810
812
        self.addCleanup(self._restoreHooks)
811
813
        # reset all hooks to an empty instance of the appropriate type
812
814
        bzrlib.branch.Branch.hooks = bzrlib.branch.BranchHooks()
 
815
        bzrlib.smart.client._SmartClient.hooks = bzrlib.smart.client.SmartClientHooks()
813
816
        bzrlib.smart.server.SmartTCPServer.hooks = bzrlib.smart.server.SmartServerHooks()
814
817
 
815
818
    def _silenceUI(self):