~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-09 15:55:01 UTC
  • mto: This revision was merged to the branch mainline in revision 1995.
  • Revision ID: john@arbash-meinel.com-20060909155501-3d39643be1accab1
Unset a few other LANG type variables when spawning diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import tempfile
23
23
import time
24
24
 
 
25
from bzrlib import (
 
26
    errors,
 
27
    osutils,
 
28
    )
25
29
# compatability - plugins import compare_trees from diff!!!
26
30
# deprecated as of 0.10
27
31
from bzrlib.delta import compare_trees
28
32
from bzrlib.errors import BzrError
29
 
import bzrlib.errors as errors
30
 
import bzrlib.osutils
31
33
from bzrlib.patiencediff import unified_diff
32
34
import bzrlib.patiencediff
33
35
from bzrlib.symbol_versioning import (deprecated_function,
90
92
 
91
93
def _set_lang_C():
92
94
    """Set the env var LANG=C"""
93
 
    os.environ['LANG'] = 'C'
 
95
    osutils.set_or_unset_env('LANG', 'C')
 
96
    osutils.set_or_unset_env('LC_ALL', None)
 
97
    osutils.set_or_unset_env('LC_CTYPE', None)
 
98
    osutils.set_or_unset_env('LANGUAGE', None)
94
99
 
95
100
 
96
101
def _spawn_external_diff(diffcmd, capture_errors=True):