~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patch.py

  • Committer: Martin Pool
  • Date: 2006-02-22 04:29:54 UTC
  • mfrom: (1566 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1569.
  • Revision ID: mbp@sourcefrog.net-20060222042954-60333f08dd56a646
[merge] from bzr.dev before integration
Fix undefined ordering in sign_my_revisions breaking tests

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)