/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 breezy/patch.py

  • Committer: Vincent Ladeuil
  • Date: 2019-11-19 17:16:42 UTC
  • mto: (7290.1.43 work)
  • mto: This revision was merged to the branch mainline in revision 7414.
  • Revision ID: v.ladeuil+brz@free.fr-20191119171642-2hn0o07eq32l4sfs
Open 3.0.3 for bugfixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
 
17
from __future__ import absolute_import
17
18
 
18
19
import errno
19
20
import os
20
21
from subprocess import Popen, PIPE
21
22
 
22
 
from bzrlib.errors import NoDiff3
23
 
from bzrlib.textfile import check_text_path
 
23
from .errors import NoDiff3
 
24
from .textfile import check_text_path
24
25
 
25
26
"""Diff and patch functionality"""
26
27
 
46
47
    stdout, stderr = process.communicate(input)
47
48
    status = process.wait()
48
49
    if status < 0:
49
 
        raise Exception("%s killed by signal %i" (args[0], -status))
 
50
        raise Exception("%s killed by signal %i" % (args[0], -status))
50
51
    return stdout, stderr, status
51
52
 
52
53
 
88
89
    args.extend((mine_path, older_path, yours_path))
89
90
    try:
90
91
        output, stderr, status = write_to_cmd(args)
91
 
    except OSError, e:
 
92
    except OSError as e:
92
93
        if e.errno == errno.ENOENT:
93
94
            raise NoDiff3
94
95
        else: