~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/gpg.py

Add a new method ``Tree.revision_tree`` which allows access to cached
trees for arbitrary revisions. This allows the in development dirstate
tree format to provide access to the callers to cached copies of 
inventory data which are cheaper to access than inventories from the
repository. (Robert Collins, Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import errno
21
21
import os
22
22
import subprocess
 
23
import sys
23
24
 
24
25
from bzrlib import (
25
26
    errors,
72
73
 
73
74
    def sign(self, content):
74
75
        ui.ui_factory.clear_term()
 
76
 
 
77
        preexec_fn = _set_gpg_tty
 
78
        if sys.platform == 'win32':
 
79
            # Win32 doesn't support preexec_fn, but wouldn't support TTY anyway.
 
80
            preexec_fn = None
75
81
        try:
76
82
            process = subprocess.Popen(self._command_line(),
77
83
                                       stdin=subprocess.PIPE,
78
84
                                       stdout=subprocess.PIPE,
79
 
                                       preexec_fn=_set_gpg_tty)
 
85
                                       preexec_fn=preexec_fn)
80
86
            try:
81
87
                result = process.communicate(content)[0]
82
88
                if process.returncode is None: