/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/patch.py

  • Committer: Robert Collins
  • Date: 2005-10-15 11:38:29 UTC
  • mfrom: (1185.16.40)
  • Revision ID: robertc@lifelesslap.robertcollins.net-20051015113829-40226233fb246920
mergeĀ fromĀ martin

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
import errno
2
1
import os
3
2
from subprocess import Popen, PIPE
4
 
 
5
 
from bzrlib.errors import NoDiff3
6
3
"""
7
4
Diff and patch functionality
8
5
"""
56
53
    add_label(args, "ANCESTOR")
57
54
    add_label(args, "MERGE-SOURCE")
58
55
    args.extend((mine_path, older_path, yours_path))
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
 
56
    output, stderr, status = write_to_cmd(args)
66
57
    if status not in (0, 1):
67
58
        raise Exception(stderr)
68
59
    file(out_file, "wb").write(output)