~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/patch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-04-19 08:42:39 UTC
  • mfrom: (1558.15.11 bzr.binaries)
  • Revision ID: pqm@pqm.ubuntu.com-20060419084239-730ca2dccc3bea14
diff and merge handle binaries safely

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
from subprocess import Popen, PIPE
4
4
 
5
5
from bzrlib.errors import NoDiff3
 
6
from bzrlib.textfile import check_text_path
6
7
"""
7
8
Diff and patch functionality
8
9
"""
51
52
def diff3(out_file, mine_path, older_path, yours_path):
52
53
    def add_label(args, label):
53
54
        args.extend(("-L", label))
 
55
    check_text_path(mine_path)
 
56
    check_text_path(older_path)
 
57
    check_text_path(yours_path)
54
58
    args = ['diff3', "-E", "--merge"]
55
59
    add_label(args, "TREE")
56
60
    add_label(args, "ANCESTOR")