~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patch.py

  • Committer: Robert Collins
  • Date: 2005-09-23 09:25:16 UTC
  • mto: (1092.3.4)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: robertc@robertcollins.net-20050923092516-e2c3c0f31288669d
Merge what applied of Alexander Belchenko's win32 patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
__docformat__ = "restructuredtext"
7
7
 
8
8
def write_to_cmd(args, input=""):
9
 
    process = Popen(args, bufsize=len(input), stdin=PIPE, stdout=PIPE,
10
 
                    stderr=PIPE, close_fds=True)
 
9
    if os.name != 'nt':
 
10
        process = Popen(args, bufsize=len(input), stdin=PIPE, stdout=PIPE,
 
11
                        stderr=PIPE, close_fds=True)
 
12
    else:
 
13
        process = Popen(args, bufsize=len(input), stdin=PIPE, stdout=PIPE,
 
14
                        stderr=PIPE)
 
15
 
11
16
    stdout, stderr = process.communicate(input)
12
17
    status = process.wait()
13
18
    if status < 0: