~ubuntu-branches/debian/lenny/bzrtools/lenny

« back to all changes in this revision

Viewing changes to patchsource.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2008-05-12 20:25:35 UTC
  • mfrom: (1.2.2 upstream) (4.1.34 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080512202535-y92gjpczwr98htxe
Tags: 1.5.0-1
New upstream release.

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()