~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf.py

  • Committer: Aaron Bentley
  • Date: 2007-08-14 18:19:16 UTC
  • Revision ID: abentley@panoramicfeedback.com-20070814181916-sm67ojoqs2qkspcy
Shelf doesn't emit kipple in test suite

Show diffs side-by-side

added added

removed removed

Lines of Context:
251
251
            args.append('-R')
252
252
        if dry_run:
253
253
            args.append('--dry-run')
254
 
            stdout = stderr = subprocess.PIPE
 
254
            stderr = subprocess.PIPE
255
255
        else:
256
 
            stdout = stderr = None
 
256
            stderr = None
257
257
 
258
258
        try:
259
259
            process = subprocess.Popen(args, stdin=subprocess.PIPE,
260
 
                                       stdout=stdout, stderr=stderr)
 
260
                                       stdout=subprocess.PIPE, stderr=stderr)
261
261
            for patch in patches:
262
262
                process.stdin.write(str(patch))
 
263
            process.stdin.close()
263
264
 
264
265
        except IOError, e:
265
266
            raise PatchInvokeError(e, process.stderr.read())
266
267
 
267
 
        process.communicate()
268
 
 
269
268
        result = process.wait()
 
269
        if not dry_run:
 
270
            sys.stdout.write(process.stdout.read())
270
271
        if result != 0:
271
272
            raise PatchFailed()
272
273