~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: John Arbash Meinel
  • Date: 2012-09-14 07:22:49 UTC
  • mfrom: (6015.57.3 2.4)
  • mto: (6015.57.7 2.4)
  • mto: This revision was merged to the branch mainline in revision 6579.
  • Revision ID: john@arbash-meinel.com-20120914072249-rvpderuqqme7sy88
Merge bzr/2.4 (6072) into client-reconnect code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1939
1939
 
1940
1940
        self.log('run bzr: %r', args)
1941
1941
        # FIXME: don't call into logging here
1942
 
        handler = logging.StreamHandler(stderr)
1943
 
        handler.setLevel(logging.INFO)
 
1942
        handler = trace.EncodedStreamHandler(stderr, errors="replace",
 
1943
            level=logging.INFO)
1944
1944
        logger = logging.getLogger('')
1945
1945
        logger.addHandler(handler)
1946
1946
        old_ui_factory = ui.ui_factory
4756
4756
            f = tempfile.mkstemp(prefix='bzr_perms_chk_')
4757
4757
            fd, name = f
4758
4758
            os.close(fd)
4759
 
            os.chmod(name, write_perms)
 
4759
            osutils.chmod_if_possible(name, write_perms)
4760
4760
 
4761
4761
            read_perms = os.stat(name).st_mode & 0777
4762
4762
            os.unlink(name)