/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/patiencediff.py

  • Committer: Jelmer Vernooij
  • Date: 2017-06-10 00:21:41 UTC
  • mto: This revision was merged to the branch mainline in revision 6675.
  • Revision ID: jelmer@jelmer.uk-20170610002141-m1z5k7fs8laesa65
Fix import.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# along with this program; if not, write to the Free Software
16
16
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
17
 
 
18
from __future__ import absolute_import
18
19
 
19
 
from bzrlib.lazy_import import lazy_import
 
20
from .lazy_import import lazy_import
20
21
lazy_import(globals(), """
21
22
import os
22
23
import sys
73
74
     four
74
75
    """
75
76
    if sequencematcher is None:
76
 
        import difflib
77
77
        sequencematcher = difflib.SequenceMatcher
78
78
 
79
79
    if fromfiledate:
129
129
 
130
130
 
131
131
try:
132
 
    from bzrlib._patiencediff_c import (
 
132
    from ._patiencediff_c import (
133
133
        unique_lcs_c as unique_lcs,
134
134
        recurse_matches_c as recurse_matches,
135
135
        PatienceSequenceMatcher_c as PatienceSequenceMatcher
136
136
        )
137
137
except ImportError:
138
 
    from bzrlib._patiencediff_py import (
 
138
    from ._patiencediff_py import (
139
139
        unique_lcs_py as unique_lcs,
140
140
        recurse_matches_py as recurse_matches,
141
141
        PatienceSequenceMatcher_py as PatienceSequenceMatcher
157
157
    matcher = algorithms[opts.matcher]
158
158
 
159
159
    if len(args) != 2:
160
 
        print 'You must supply 2 filenames to diff'
 
160
        print('You must supply 2 filenames to diff')
161
161
        return -1
162
162
 
163
163
    for line in unified_diff_files(args[0], args[1], sequencematcher=matcher):