~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to patchsource.py

  • Committer: Aaron Bentley
  • Date: 2008-10-08 13:55:13 UTC
  • Revision ID: aaron@aaronbentley.com-20081008135513-wjxlb9sgh9ua0edb
Publish getchar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import re
 
2
 
1
3
from bzrlib import patches
2
4
 
 
5
from bzrlib.plugins.bzrtools import errors
 
6
 
3
7
class PatchSource(object):
4
8
    def __iter__(self):
5
9
        def iterator(obj):
51
55
 
52
56
        show_diff_trees(self.old_tree, self.tree, f, self.file_list,
53
57
                        old_label='', new_label='')
54
 
 
 
58
        if re.search('Binary files .* differ', f.getvalue()):
 
59
            raise errors.ChangedBinaryFiles()
55
60
        f.seek(0)
56
61
        return f.readlines()