~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to shelf.py

  • Committer: Aaron Bentley
  • Date: 2006-11-23 18:06:43 UTC
  • Revision ID: abentley@panoramicfeedback.com-20061123180643-6ry3xqozdbn4cfhy
Update docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
import sys
3
3
import subprocess
4
4
from datetime import datetime
5
 
from errors import CommandError, PatchFailed, PatchInvokeError
 
5
from errors import CommandError, PatchFailed
6
6
from hunk_selector import ShelveHunkSelector, UnshelveHunkSelector
7
7
from patchsource import PatchSource, FilePatchSource
8
8
from bzrlib.osutils import rename
255
255
        else:
256
256
            stdout = stderr = None
257
257
 
258
 
        try:
259
 
            process = subprocess.Popen(args, stdin=subprocess.PIPE,
260
 
                                       stdout=stdout, stderr=stderr)
261
 
            for patch in patches:
262
 
                process.stdin.write(str(patch))
263
 
 
264
 
        except IOError, e:
265
 
            raise PatchInvokeError(e, process.stderr.read())
 
258
        process = subprocess.Popen(args, stdin=subprocess.PIPE, stdout=stdout,
 
259
                        stderr=stderr)
 
260
        for patch in patches:
 
261
            process.stdin.write(str(patch))
266
262
 
267
263
        process.communicate()
268
264