/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/diff.py

Support user.signingkey configuration variable in .git/config.

Merged from https://code.launchpad.net/~jelmer/brz/local-git-key/+merge/381000

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
import contextlib
 
17
from __future__ import absolute_import
 
18
 
18
19
import difflib
19
20
import os
20
21
import re
28
29
import tempfile
29
30
 
30
31
from breezy import (
 
32
    cleanup,
31
33
    controldir,
32
34
    osutils,
33
35
    textfile,
45
47
from .registry import (
46
48
    Registry,
47
49
    )
 
50
from .sixish import text_type
48
51
from .trace import mutter, note, warning
49
52
from .tree import FileTimestampUnavailable
50
53
 
516
519
        context = DEFAULT_CONTEXT_AMOUNT
517
520
    if format_cls is None:
518
521
        format_cls = DiffTree
519
 
    with contextlib.ExitStack() as exit_stack:
 
522
    with cleanup.ExitStack() as exit_stack:
520
523
        exit_stack.enter_context(old_tree.lock_read())
521
524
        if extra_trees is not None:
522
525
            for tree in extra_trees:
799
802
        if sys.platform == 'win32':  # Popen doesn't accept unicode on win32
800
803
            command_encoded = []
801
804
            for c in command:
802
 
                if isinstance(c, str):
 
805
                if isinstance(c, text_type):
803
806
                    command_encoded.append(c.encode('mbcs'))
804
807
                else:
805
808
                    command_encoded.append(c)