~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patch.py

  • Committer: Aaron Bentley
  • Date: 2006-02-22 14:39:42 UTC
  • mto: (2027.1.2 revert-subpath-56549)
  • mto: This revision was merged to the branch mainline in revision 1570.
  • Revision ID: abentley@panoramicfeedback.com-20060222143942-ae72299f2de66767
Fixed build_tree with symlinks

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import errno
1
2
import os
2
3
from subprocess import Popen, PIPE
 
4
 
 
5
from bzrlib.errors import NoDiff3
3
6
"""
4
7
Diff and patch functionality
5
8
"""
53
56
    add_label(args, "ANCESTOR")
54
57
    add_label(args, "MERGE-SOURCE")
55
58
    args.extend((mine_path, older_path, yours_path))
56
 
    output, stderr, status = write_to_cmd(args)
 
59
    try:
 
60
        output, stderr, status = write_to_cmd(args)
 
61
    except OSError, e:
 
62
        if e.errno == errno.ENOENT:
 
63
            raise NoDiff3
 
64
        else:
 
65
            raise
57
66
    if status not in (0, 1):
58
67
        raise Exception(stderr)
59
68
    file(out_file, "wb").write(output)